github.com/dgraph-io/dgraph@v1.2.8/graphql/schema/testdata/schemagen/input/no-id-field.graphql (about) 1 # Posts shouldn't have a 2 # getPost(id: ID): Post 3 # GraphQL query generated, because there's no ID to reference. 4 # Similarly update & delete shouldn't be generated because you 5 # can't reference the node to delete it. 6 type Post { 7 content: String! 8 author: Author! 9 10 # The generated mutation types should allow adding these, but 11 # not adding references to existing. This doesn't make sense for 12 # this schema, but just tests that both list and single objects 13 # work without IDs 14 genre: Genre 15 } 16 17 type Author { 18 id: ID 19 name: String 20 21 # The input type should allow to create posts as part of adding an 22 # author, but not add by reference. You can also add 23 # posts with a reference to the author and the author gets hooked 24 # up to the post in Dgraph ... just that this GraphQL schema 25 # says you can't query by ID for Post, but you can follow the 26 # Author's posts link (or if there were @search(by:...) in post 27 # it could be queried that way). 28 posts: [Post] 29 } 30 31 type Genre { 32 name: String! 33 }