Skip to content

Commit

Permalink
include union @requires example in computed_requires
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Bijkerk committed Oct 29, 2024
1 parent 4f3f314 commit ffb9164
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plugin/federation/testdata/computedrequires/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,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 ffb9164

Please sign in to comment.