Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
AddMessage.Variables
> {
document: any = gql`
mutation AddMessage($chatId: ID!, $content: String!) {
addMessage(chatId: $chatId, content: $content) {
...Message
}
}
${MessageFragment}
`;
}
@Injectable({
providedIn: "root"
})
export class ChatAddedGQL extends Apollo.Subscription<
ChatAdded.Subscription,
ChatAdded.Variables
> {
document: any = gql`
subscription chatAdded {
chatAdded {
...ChatWithoutMessages
messages {
...Message
}
}
}
${ChatWithoutMessagesFragment}
${MessageFragment}
`;
GetUsers.Variables
> {
document: any = gql`
query GetUsers {
users {
id
name
picture
}
}
`;
}
@Injectable({
providedIn: "root"
})
export class MessageAddedGQL extends Apollo.Subscription<
MessageAdded.Subscription,
MessageAdded.Variables
> {
document: any = gql`
subscription messageAdded {
messageAdded {
...Message
chat {
id
}
}
}
${MessageFragment}
`;
}