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
Using graphql-apigen #28
Comments
Sorry, I'm not familiar with CDI or jboss, so I can't provide any examples. |
Humm... it sounds like javax.enterprise.inject.Instance is a CDI specific thing. It might be worth commenting on this: https://issues.jboss.org/browse/CDI-45?_sscc=t ...perhaps a good compromise is for graphql-apigen to generate CDI specific TypeProviders? Note that if you want to avoid forking graphql-apigen, you can simply copy the modified graphql-apigen.stg into the directory containing your pom.xml: https://github.com/Distelli/graphql-apigen/blob/master/apigen/src/main/resources/graphql-apigen.stg Thanks, |
Could you explain why those dependencies are optional? |
The optional injection points are for resolve an object id into a full object. This isn't necessary for all objects. For example, you might not have foreign key references to an object type and thus it would never need to be resolved from id to full object. |
That's the role of *.Resolver, but what about the _impl? |
It's been awhile since I've thought about this, but you can see MethodDataFetcher will use the graphql.schema.DataFetchingEnvironment "source" if impl is null: I believe this is useful if your implementation is a simple POJO that doesn't need to interact with your dependency injection system. |
I debugged the Spring version. The AuthorTypeProvider has an Author _impl = null. The Optional injection works in Spring. Could you confirm that a Impl MUST be implemented ONLY for types that have function in the schema? |
That is correct. |
Hello
I have difficulties to integrate graphql-apigen generated beans with CDI without guice. I use jboss as an application server.
Could you provide an exemple?
The text was updated successfully, but these errors were encountered: