{"size": 1390, "ext": "js", "max_stars_repo_path": "src/graphql/queries/conversation.js", "max_stars_repo_name": "APEC-2021-NZ/AirTour-App", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/graphql/queries/conversation.js", "max_issues_repo_name": "APEC-2021-NZ/AirTour-App", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/graphql/queries/conversation.js", "max_forks_repo_name": "APEC-2021-NZ/AirTour-App", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.9655172414, "max_line_length": 80, "alphanum_fraction": 0.4741007194}
import { gql } from '@apollo/client'
import {
    ConversationFragment,
    UserFragment,
    GuideFragment,
    MessageFragment,
} from '../fragments'

const ConversationQuery = gql`
    query ConversationQuery($conversationID: ID!, $limit: Int!, $offset: Int!) {
        conversation(conversationID: $conversationID) {
            ...ConversationFragment
            user {
                ...UserFragment
            }
            guide {
                ...GuideFragment
            }
            messages(limit: $limit, offset: $offset) {
                ...MessageFragment
            }
        }
    }
    ${ConversationFragment}
    ${UserFragment}
    ${GuideFragment}
    ${MessageFragment}
`

const ConverstationsQuery = gql`
    query ConverstationsQuery {
        me {
            id
            conversations {
                ...ConversationFragment
                user {
                    ...UserFragment
                }
                guide {
                    ...GuideFragment
                    user {
                        ...UserFragment
                    }
                }
                messages(limit: 1, offset: 0) {
                    ...MessageFragment
                }
            }
        }
    }
    ${ConversationFragment}
    ${UserFragment}
    ${GuideFragment}
    ${MessageFragment}
`

export { ConversationQuery, ConverstationsQuery }
