gql queries variables code example
Example 1: appolo client variables pass
const query = gql`
query User($okta: String) {
User(okta: $okta){
id
}
}
`;
client.query({
query: query,
variables: {
okta: 'some string'
}
})
Example 2: graphql mutation passing data
input EventInput {
title:String!
desc:String!
price:Float!
}
type RootMutations{
createEvent(E_input:EventInput) : Event
}