{"record":{"id":"f072db999b0b5be4","repo":"refinedev/refine","slug":"graphql-need-to-operation-fields-and-variables-va","errorCode":null,"errorMessage":"GraphQL need to operation, fields and variables values in meta object.","messagePattern":"GraphQL need to operation, fields and variables values in meta object\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/hasura/src/dataProvider/index.ts","lineNumber":631,"sourceCode":"          }\n          const { query, variables } = gql.mutation({\n            operation: meta.operation,\n            fields: meta.fields,\n            variables: meta.variables,\n          });\n\n          const response = await gqlClient.request<BaseRecord>(\n            query,\n            variables,\n          );\n\n          return {\n            data: response[meta.operation],\n          };\n        }\n        throw Error(\"GraphQL operation name required.\");\n      }\n      throw Error(\n        \"GraphQL need to operation, fields and variables values in meta object.\",\n      );\n    },\n  };\n};\n\nexport default dataProvider;\n","sourceCodeStart":613,"sourceCodeEnd":639,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/hasura/src/dataProvider/index.ts#L613-L639","documentation":"The hasura data provider's custom() method requires the meta object to include operation, fields, and variables. This error is thrown when meta itself (or any of its required members) is missing entirely, so the provider cannot construct a GraphQL request. All three keys are mandatory even if empty.","triggerScenarios":"Calling custom({ url, method }) with no meta at all, or meta missing fields/variables (e.g. only passing operation).","commonSituations":"Treating custom() like the REST providers' custom() which takes a plain URL; upgrading refine versions where the meta contract became strict; copying examples from strapi/airtable providers.","solutions":["Pass a complete meta object: { operation, fields, variables } — supply empty arrays/objects for unused parts","Confirm you are on @refinedev/hasura and reading its custom() docs, not the generic data provider docs","If you just need a raw HTTP call, use your own fetch/axios instead of custom()"],"exampleFix":"// before\nawait dataProvider.custom({ url: \"/x\", method: \"post\" });\n\n// after\nawait dataProvider.custom({\n  url: \"\",\n  method: \"post\",\n  meta: { operation: \"deleteUser\", fields: [\"id\"], variables: { id: 1 } },\n});","handlingStrategy":"validation","validationCode":"const metaOk = !!meta && [\"operation\",\"fields\",\"variables\"].every((k) => k in meta);","typeGuard":"const isCustomMeta = (m: unknown): m is { operation: string; fields: any[]; variables: Record<string, unknown> } =>\n  typeof m === \"object\" && m !== null && \"operation\" in m && \"fields\" in m && \"variables\" in m;","tryCatchPattern":"try { await dataProvider.custom({ url, method, meta }); } catch (e) { if (String(e).includes(\"meta object\")) { /* supply full meta */ } else throw e; }","preventionTips":["Treat meta as required for hasura custom(), not optional","Type your custom() params explicitly so TypeScript flags missing keys"],"tags":["refine","hasura","graphql","meta","validation"],"backgroundTag":"missing-graphql-operation-meta","analyzedSha":"779d52a20e29b0307ac0df04d135beba434370dc","analyzedAt":"2026-08-27T11:15:25.854Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}