Skip to content

Instantly share code, notes, and snippets.

@deadcoder0904
Created May 29, 2018 20:26
Show Gist options
  • Save deadcoder0904/59bef98f90c95af84f9a83b9095863c7 to your computer and use it in GitHub Desktop.
Save deadcoder0904/59bef98f90c95af84f9a83b9095863c7 to your computer and use it in GitHub Desktop.
type App {
id: ID!
name: String!
link: String!
}
type AppConnection {
items: [App]
nextToken: String
}
input CreateAppInput {
id: ID!
name: String!
link: String!
}
input DeleteAppInput {
id: ID!
}
type Mutation {
createApp(input: CreateAppInput!): App
updateApp(input: UpdateAppInput!): App
deleteApp(input: DeleteAppInput!): App
}
type Query {
getSingleApp(id: ID!): App
getApp(id: ID!): App
listApps(first: Int, after: String): AppConnection
}
type Subscription {
onCreateApp(id: ID, name: String, link: String): App
@aws_subscribe(mutations: ["createApp"])
onUpdateApp(id: ID, name: String, link: String): App
@aws_subscribe(mutations: ["updateApp"])
onDeleteApp(id: ID, name: String, link: String): App
@aws_subscribe(mutations: ["deleteApp"])
}
input UpdateAppInput {
id: ID!
name: String
link: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment