Skip to content

Extract queryProviders, mutationProviders, and typeProviders behind a schemaProvider. - #15

Closed
apottere wants to merge 3 commits into
graphql-java-kickstart:masterfrom
DealerDotCom:schema-provider
Closed

apottere wants to merge 3 commits into
graphql-java-kickstart:masterfrom
DealerDotCom:schema-provider

Conversation

@apottere

Copy link
Copy Markdown
Contributor

Per #14, I extracted the other providers behind a "schemaProvider" that can be injected into the servlet instead.

I have no experience with OSGI, so I need help making sure that will all wire correctly (it probably won't in its current state).

public void bindQueryProvider(GraphQLQueryProvider queryProvider) {
queryProviders.add(queryProvider);
updateSchema();
@Reference(cardinality = ReferenceCardinality.MANDATORY, policyOption = ReferencePolicyOption.GREEDY)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct?

import java.util.List;
import java.util.Set;

public class OsgiSchemaProvider extends GraphQLSchemaProvider implements Serializable {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need any OSGI annotations here?

@apottere

apottere commented Feb 2, 2017

Copy link
Copy Markdown
Contributor Author

@yrashk Any chance you'll be able to look at this soon? I'm currently using a workaround (extending the class in the same package) to set the schema manually, but it's pretty hacky.

@apottere

Copy link
Copy Markdown
Contributor Author

Since I don't really know how to make sure I'm not breaking the OSGI support, I'm going to revisit the original strategy of #14.

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

Successfully merging this pull request may close these issues.

1 participant