Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created October 10, 2018 17:15
Show Gist options
  • Save adrianhall/74114c500d3b36cf4370993ed9468c26 to your computer and use it in GitHub Desktop.
Save adrianhall/74114c500d3b36cf4370993ed9468c26 to your computer and use it in GitHub Desktop.
type User {
userId: ID!
name: String
}
input UserInput {
name: String
}
type UserPagedConnection {
users: [User!]!
nextToken: String
}
type Query {
allUsers(limit: Int, nextToken: String): UserPagedConnection!
}
type Mutation {
addUser(userId: ID!, userDetails: UserInput): User
updateUser(userDetails: UserInput!): User
}
type Subscription {
userUpdates: User
@aws_subscribe(mutations: ["addUser", "updateUser"])
}
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment