how to call a function in every graphql call code example
Example 1: graphql mutation passing data
input EventInput {
title:String!
desc:String!
price:Float!
}
type RootMutations{
createEvent(E_input:EventInput) : Event
}
Example 2: query sequnce graphql
export default compose(
graphql(firstQuery, {
name: 'firstQuery'
}),
graphql(secondQuery, {
name: 'secondQuery',
skip: ({ firstQuery }) => !firstQuery.data,
options: ({firstQuery}) => ({
variables: {
var1: firstQuery.data.someQuery.someValue
}
})
})
)(withRouter(TestPage))