cerebral / overmind

Overmind - Frictionless state management

Home Page:https://overmindjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Graphql queries and mutations don't include headers in responses

RustyDev opened this issue · comments

It would be a nice to have the option to get the full response back from graphql queries and mutations instead of response.data.

overmind-graphql is currently using request

Would it be possible to add an option to get full response back from graphql queries and mutations using rawRequest?

Hi there!

I did a few iterations on this and ended up with extending:

const gql = graphql({
  queries: {},
  mutations: {},
  subscriptions: {},
  // NEW
  rawQueries: {},
  rawMutations{}
})

This gives the most flexibility and typing is handled very straight forward. It is now in next which is a breaking release, but love for you to test it 😄

Thank you, trying it out now and will report back

Released! 🎉