GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Does graphql-java-tools support the "@oneOf" directive? · graphql-java-kickstart/graphql-java-tools · Discussion #755

Does graphql-java-tools support the "@oneOf" directive? #755

Unanswered
zleonov asked this question in Q&A
Does graphql-java-tools support the "@oneOf" directive? #755
@zleonov zleonov
Jul 26, 2023 · 0 comments
Return to top
Discussion options
  • Uh oh!

    There was an error while loading. Please reload this page.

zleonov
Jul 26, 2023

I can't seem to find a strait forward answer online:

Let's say this is the pertinent part of my schema:

input CustomStringAttributeInput {
    name: String!
    value: String!
}

input CustomBooleanAttributeInput {
    name: String!
    value: Boolean!
}

input CustomAttributeInput @oneOf {
    boolean: CustomBooleanAttributeInput    
    string: CustomStringAttributeInput
}

When I attempt to use CustomAttributeInput in a query or mutation I get:
Exception in thread "main" graphql.kickstart.tools.SchemaError: Expected type 'CustomBooleanAttributeInput' to be a GraphQLInputType, but it wasn't! Was a type only permitted for object types incorrectly used as an input type, or vice-versa?

I've used graphql-java-tools long enough to know that error message may be incorrect. I seemed to have the right classes, with the right hierarchy and the correct getters and setters.

I will make a small standalone sample to share. But if anyone can answer whether or not graphql-java-tools (and graphql-java) support this directive in the first place, it would be very helpful.

You must be logged in to vote
All reactions

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
@zleonov
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.