Skip to content

Instantly share code, notes, and snippets.

@cuongld2
Created March 30, 2020 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cuongld2/124095bd20116829f65f6fb073ac1e91 to your computer and use it in GitHub Desktop.
Save cuongld2/124095bd20116829f65f6fb073ac1e91 to your computer and use it in GitHub Desktop.
Define graphql types
type Mutation{
createUserInfo(input: CreateUserInfo!) : Boolean!
authenticateUserInfo(input: AuthenticateUserInfo!): JwtResponse!
createBlog(input: CreateBlog!) : Blog!
}
input CreateUserInfo{
username: String!
password: String!
fullname: String!
}
input CreateBlog{
title: String!
content: String!
}
input AuthenticateUserInfo{
username: String!
password: String!
}
type JwtResponse{
token: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment