Skip to content

Conversation

@apottere
Copy link
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
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
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
Copy link
Contributor Author

apottere commented Feb 2, 2017

@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
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

1 participant