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