...
1# GraphQL schema example
2#
3# https://gqlgen.com/getting-started/
4extend schema
5 @link(url: "https://specs.apollo.dev/federation/v2.7",
6 import: ["@key", "@shareable", "@provides", "@external", "@tag", "@extends", "@override", "@inaccessible"])
7
8type Todo {
9 id: ID!
10 text: String!
11 done: Boolean!
12 user: User!
13}
14
15type User {
16 id: ID!
17 name: String!
18}
19
20type Query {
21 todos: [Todo!]!
22}
23
24input NewTodo {
25 text: String!
26 userId: String!
27}
28
29type Mutation {
30 createTodo(input: NewTodo!): Todo!
31}
View as plain text