You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Design question: translating field selections into an external execution model (adapter built on graphql-java) #4538
I maintain Foundgine, an open-source semantic execution layer (https://github.com/CristianBarragan/Foundgine). Applications define entities, fields, relationships and capabilities once, and every request is resolved against that semantic model, authorized using the identity supplied by the host application, bound into a provider-independent execution plan, and executed. The Java version core is on Maven Central (io.github.cristianbarragan:foundgine-core).
Reading the request. Is DataFetchingEnvironment.getSelectionSet() (DataFetchingFieldSelectionSet and SelectedField) the recommended, stable way to read nested fields, arguments and aliases from a root field fetcher, with fragments already resolved? And for directives and variables, is it better to use the environment, or to parse the document with the Parser and walk the AST myself?
Schema. Foundgine's semantic model is the source of truth. Would you generate SDL from the model at startup and attach a single generic DataFetcher to the root fields, or build the GraphQLSchema programmatically through the schema generator APIs? Are there pitfalls with schemas that are fully derived from external metadata?
Identity. What is the recommended way to carry caller identity from the host application (for example a Spring Security principal) into the fetcher, so authorization can run before execution: GraphQLContext, a custom ExecutionInput context, or something else?
I'd also welcome pointers to existing libraries that do something similar, so I can follow their conventions rather than invent new ones.
Activity