vscode-restclient icon indicating copy to clipboard operation
vscode-restclient copied to clipboard

graphQL: Using a variable with type Long!

Open sealover06 opened this issue 2 years ago • 0 comments

{{dossierId}} has a type of Long in the variable object below.,

{{dossierId}} in the rest rest extension is displayed in red. If I add quotes like "{{dossierID}}", the red disapears, but then the query fails because the backend expects a Long and not a String.

what's the trick for this ? thanks in advance,

============================================================= @dossierId = {{dossier_createFromTemplate.response.body.data.dossier_createFromTemplate.$.id}}

@name dossier_addParticipant

POST {{gql_url}} Content-Type: application/json Accept: application/json Authorization: Bearer {{token}} X-REQUEST-TYPE: GraphQL

mutation dossier_addParticipantFromTemplate($personId: Long!, $dossierId: Long!) { dossier_addParticipantFromTemplate( dossierId: $dossierId personId: $personId ) { id } }

{ "dossierId": {{dossierId}}, "personId": 136472 }

sealover06 avatar Apr 14 '22 11:04 sealover06