Skip to content

Allow specification of mutation strategy - #240

Merged
dminkovsky merged 1 commit into
graphql-java:masterfrom
dminkovsky:custom-mutation-strategy
Dec 19, 2016
Merged

dminkovsky merged 1 commit into
graphql-java:masterfrom
dminkovsky:custom-mutation-strategy

Conversation

@dminkovsky

Copy link
Copy Markdown
Contributor

Fixes #208 and #97. Use case for me is writing an async execution strategy. A custom mutation strategy is needed to not block on mutation results, even while they are executed serially.

@dminkovsky
dminkovsky force-pushed the custom-mutation-strategy branch from ead1e93 to 946762a Compare November 15, 2016 02:43
@dminkovsky

Copy link
Copy Markdown
Contributor Author

Will add some tests, though this passes currently.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread src/main/java/graphql/GraphQL.java Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: I wonder if this should be deprecated with the new change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the cod should have a Builder of GraphQL objects so it can be extended more easily over time.

GraphQL.newGraph()
  .schema(mySchema)
  .executionStategy(s1)
  .mutationStrategy(ms)
  .build();

I have a PR in that adds an "Instrumentation SPI" and this is YET another example adding extra aspects to the GrapQL object

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.

Thanks for pointing this out @IamCornholio. Going to leave this for now, and consider @bbakerman's builder PR. Thanks

@dminkovsky
dminkovsky force-pushed the custom-mutation-strategy branch from 946762a to c01d6bf Compare November 16, 2016 14:51
@dminkovsky
dminkovsky force-pushed the custom-mutation-strategy branch 2 times, most recently from 5030313 to d2c5e62 Compare December 19, 2016 00:04
@dminkovsky
dminkovsky force-pushed the custom-mutation-strategy branch from d2c5e62 to 421383c Compare December 19, 2016 00:05
@dminkovsky dminkovsky changed the title Customize mutation strategy Allow configuration of mutation strategies Dec 19, 2016
@dminkovsky dminkovsky changed the title Allow configuration of mutation strategies Allow configuration of mutation strategy Dec 19, 2016
@dminkovsky dminkovsky changed the title Allow configuration of mutation strategy Allow specification of mutation strategy Dec 19, 2016
@dminkovsky
dminkovsky merged commit 8f1681d into graphql-java:master Dec 19, 2016
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.

3 participants