These are chat archives for graphql-java/graphql-java

22nd
Apr 2017
Bojan Tomić
@kaqqao
Apr 22 2017 17:24

Guys, how do you normally deal with fetching clientMutationId? It is available in the arguments only on the top level (the mutation itself). By the time I need to fetch it to return it to the client, it is no longer accessible...
I only see two (and a half) possibilities:

  • actually modify the resulting object on the top level to contain this field
    • transform the resulting object into a map, and then add clientMutationId to the map
  • persist the provided value in the context, and later fetch from there

Does anyone have something else? Which approach do you normally take?
Can I somehow take advantage of ExecutionIdProvider? I guess not (without a custom execution strategy) as the ID is not propagated to the DataFetchingEnvironment.