How to dynamically register with Graphql NetflixDgs based on schema?

Viewed 16

For instance I have a schema that has directives and tags.

In Java it seems like the GraphQLSchema type is being populated AFTER registration, but I want to use typing here to determine things during registration.

Is there a way to do this without a circular dependency (What im seeing now)

┌─────┐
|  schemaUtil defined in file [xxx/SchemaUtil.class]
↑     ↓
|  schema defined in class path resource [com/netflix/graphql/dgs/autoconfig/DgsAutoConfiguration.class]
↑     ↓
|  registration defined in file [/xxx/Registration.class]
└─────┘

We dont necessarily NEED this because I can check type names during registration, but would rather it be cleaner.

0 Answers
Related