data()
Returns a data payload as the response to a GraphQL operation.
Call signature
1function data(payload: Record<string, any>): MockedResponse
Examples
1graphql.query('GetUserDetail', (req, res, ctx) => {2 return res(3 ctx.data({4 user: {5 firstName: 'John',6 age: 32,7 },8 }),9 )10})