Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@requires on Union field #3167

Open
rickbijkerk opened this issue Oct 14, 2024 · 0 comments
Open

@requires on Union field #3167

rickbijkerk opened this issue Oct 14, 2024 · 0 comments

Comments

@rickbijkerk
Copy link

rickbijkerk commented Oct 14, 2024

Issue Description

GIven a schema like the following i cant seem to figure out the correct syntax to add a requires on field thats a union

type Offer@key(fields: "uuid") {
  uid: ID!

  testField: String! @requires(fields: "condition { ... on SecondHandCondition { description } } }")
  testField: String! @requires(fields: "condition { description } }")
  # what is the correct syntax here?

  condition: OfferCondition! @external 
}

union OfferCondition = SecondHandCondition | NewCondition

type NewCondition{
  description: String
}

type SecondHandCondition{
  description: String!
}

Link to Reproduction

none

Reproduction Steps

If above example is not sufficient i can provide a reproduction, as of right now it feels like a lacking feature/documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant