-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3d7c9d
commit cb07a95
Showing
10 changed files
with
629 additions
and
257 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
# GraphQL schema example | ||
# | ||
# https://gqlgen.com/getting-started/ | ||
|
||
type Todo { | ||
id: ID! | ||
text: String! | ||
done: Boolean! | ||
user: User! | ||
type Role { | ||
userId: String! | ||
role: RoleId! | ||
} | ||
|
||
type User { | ||
id: ID! | ||
email: String! | ||
displayName: String! | ||
} | ||
|
||
type Query { | ||
todos: [Todo!]! | ||
roles: [Role!]! | ||
users: [User!]! | ||
} | ||
|
||
input NewTodo { | ||
text: String! | ||
userId: String! | ||
enum RoleId { | ||
user | ||
admin | ||
super | ||
} | ||
|
||
input NewUser { | ||
email: String! | ||
displayName: String! | ||
} | ||
|
||
type Mutation { | ||
createTodo(input: NewTodo!): Todo! | ||
userCreate(input: NewUser!): User! | ||
userAssignRoles(input: [String!]): [Role!] | ||
userGetRoles(userId: String!): [RoleId!] | ||
} |
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.