Posted 3 June 2023, 11:01 pm EST - Updated 3 June 2023, 11:12 pm EST
search post query in graphql not work:
i have graphql quer like below :
{getirTax_Reports(search: { id: 1583 }) {id,Sale_Hdr_IDGen,taxid,indatim,Indati2m,inty,inno,irtaxid,inp } }
in my report i defined a parameter for id and it’s name in invoice_id
i want to replace the invoice_id wirh 1583 in my post query but it doesn’t work please help me
my post body query is :
{{"query":"{{getirTax_Reports(search:(id:{@invoice_id})){{id,Sale_Hdr_IDGen,taxid,indatim,Indati2m,inty,inno,irtaxid,inp}}"}
the error is :
Incorrect query string
*Unable to load data from “http://localhost:4000/graphql”: 400 {“errors”:[{“message”:“Syntax Error: Unexpected "(".”,“locations”:[{“line”:1,“column”:26}],“extensions”:{“code”:“GRAPHQL_PARSE_FAILED”,“stacktrace”:[“GraphQLError: Syntax Error: Unexpected "(".”," at syntaxError (D:\MyProjects\nvweb\backend\node_modules\graphql\error\syntaxError.js:15:10)“,” at Parser.unexpected
when i use my query withou search it works correctly and the correct one is like below whithout search :
{{"query":"{{getirTax_Reports{{id,Sale_Hdr_IDGen,taxid,indatim,Indati2m,inty,inno,irtaxid,inp}}"}