I have simple graphql query to update an object
const UPDATE_WORKFLOW_MUTATION = gql mutation UpdateWorkflowMutation($id: Int!, $input: UpdateWorkflowInput!) { updateWorkflow(id: $id, input: $input) { id } }
const workflow = {
title: data.workflow.title,
description: data.workflow.description,
xml: xml,
}
const id = data.workflow.id
console.log(workflow)
updateWorkflow({ variables: { id, workflow } })
keeps returning error:
{“errors”:[{“message”:“Variable “$input” of required type “UpdateWorkflowInput!” was not provided.”,“locations”:[{“line”:1,“column”:44}],“extensions”:{“code”:“INTERNAL_SERVER_ERROR”,“exception”:{“stacktrace”:[“GraphQLError: Variable “$input” of required type “UpdateWorkflowInput!” was not provided.”," at _loop (C:\reactapp\kpims\node_modules\graphql\execution\values.js:92:17)"," at coerceVariableValues (C:\reactapp\kpims\node_modules\graphql\execution\values.js:119:16)"," at getVariableValues (C:\reactapp\kpims\node_modules\graphql\execution\values.js:48:19)"," at buildExecutionContext (C:\reactapp\kpims\node_modules\graphql\execution\execute.js:184:61)"," at executeImpl (C:\reactapp\kpims\node_modules\graphql\execution\execute.js:89:20)"," at Object.execute (C:\reactapp\kpims\node_modules\graphql\execution\execute.js:64:35)"," at C:\reactapp\kpims\node_modules\apollo-server-core\src\requestPipeline.ts:548:22"," at Generator.next ()"," at C:\reactapp\kpims\node_modules\apollo-server-core\dist\requestPipeline.js:8:71"," at new Promise ()"]}}}]}
To tell you the truth i still don’t know how? So kind a cutting corners. What I am working on currently is using redwood to create a POC for a KPI Management System with fully functional workflow Engine. Yesterday my main problem was the connectivity of redwood to BPMN.IO library so created a react hook to BPMN.IO Modeller and using redwood generated Cell to update the xml. There were few hitches here and there and but i am getting to it.
Thanks for all your support.
if you are still in a generous mood and would like to help a noob out, I have all these cells lying around right of these cells is WorkflowCell, what if i want to reuse this cell in another cell how would i go on doing that without having to render that cell.
Thanks. I was wondering because I had read that Prisma sets strings to be limited to 191 characters.
But now that I look at the SQL Prisma generates, it is using a TEXT so the XML could fit – I guess Prisma has updated that since (or use of native types addressed it) the issue was raised (which is nice).