Created
March 5, 2020 17:58
-
-
Save bogoslavskiy/5f64116ecaa5facf32ea7b05880a887d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { gql } from '@apollo/client'; | |
import { MessageItemFragment } from '../../components/Items/MessageItem'; | |
export const GetMessagesQuery = gql` | |
query Messages($offset: Int!) { | |
messages(offset: $offset, limit: 20) { | |
...MessageItem | |
} | |
} | |
${MessageItemFragment} | |
`; | |
export const SendMessageMutation = gql` | |
mutation SendMessage($input: MessageSendInput!) { | |
messages { | |
send(input: $input) { | |
...MessageItem | |
} | |
} | |
} | |
${MessageItemFragment} | |
`; | |
export const MessageSubscription = gql` | |
subscription Message { | |
message { | |
...MessageItem | |
} | |
} | |
${MessageItemFragment} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment