{"record":{"id":"294c790050fafb04","repo":"refinedev/refine","slug":"graphql-needs-operation-fields-and-variables-valu","errorCode":null,"errorMessage":"GraphQL needs operation, fields and variables values in meta object.","messagePattern":"GraphQL needs operation, fields and variables values in meta object\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/nestjs-query/src/dataProvider/index.ts","lineNumber":493,"sourceCode":"              variables: meta.variables,\n            });\n\n            query = gqlMutation.query;\n            variables = gqlMutation.variables;\n          }\n\n          const response = await _client.request<BaseRecord>({\n            document: 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 needs operation, fields and variables values in meta object.\",\n      );\n    },\n  };\n};\n\nexport default dataProvider;\n","sourceCodeStart":475,"sourceCodeEnd":501,"githubUrl":"https://github.com/refinedev/refine/blob/779d52a20e29b0307ac0df04d135beba434370dc/packages/nestjs-query/src/dataProvider/index.ts#L475-L501","documentation":"The nestjs-query data provider's custom() method requires a meta object with operation, fields, and variables. This error is thrown when meta is missing entirely or one of its required members is absent, so the provider cannot build a valid GraphQL request.","triggerScenarios":"Calling custom({ url, method }) without a meta object, or with a meta missing fields/variables.","commonSituations":"Using the REST-style custom() signature; upgrading refine where the meta contract is enforced; copying example code from REST provider docs.","solutions":["Pass the full meta object { operation, fields, variables }, using empty arrays/objects where unused","Check the nestjs-query provider docs for the exact custom() contract","Use a direct GraphQL client if you need arbitrary requests"],"exampleFix":"// before\nawait dataProvider.custom({ url: \"/things\", method: \"get\" });\n\n// after\nawait dataProvider.custom({ url: \"\", method: \"get\", meta: { operation: \"things\", fields: [\"id\", \"name\"], variables: {} } });","handlingStrategy":"validation","validationCode":"const metaOk = !!meta && \"operation\" in meta && \"fields\" in meta && \"variables\" 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\")) { /* build complete meta */ } else throw e; }","preventionTips":["Never call nestjs-query custom() without a fully populated meta","Type custom() params at the call site"],"tags":["refine","nestjs-query","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"}