Skip to content

Commit

Permalink
add schema example to show it working
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Bijkerk committed Oct 28, 2024
1 parent c562490 commit 57ecbc7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plugin/federation/testdata/explicitrequires/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ type World @key(fields: "hello { name } foo ") {
hello: Hello
}

type Person @key(fields: "name"){
name: String!
gender: Gender!
welcomeMessage: String @requires(fields:"gender { ... on Male {description} ... on Female {description}}")
}

union Gender = Male | Female

type Male {
description: String!
}

type Female {
description: String!
}

type WorldWithMultipleKeys @key(fields: "hello { name } foo ") @key(fields: "bar") {
foo: String!
bar: Int!
Expand Down

0 comments on commit 57ecbc7

Please sign in to comment.