1

How to define details array in the below request:

query{
  results(
    id: "56",
    details: 
      {
        name: "yamini",
        bloodGroup: "AB+"
        age:25
      }
    )
  {
    message
  }
}

1 Answer 1

1

Try This To Pass Array in Query

{
  results(id: "56", details: [
    {
      name: "yamini", 
      bloodGroup: "AB+", 
      age: 25
    }, 
    {
      name: "Yerusu", 
      bloodGroup: "AB-", 
      age: 22
    }
   ]
  ) {
    message
  }
}

For More : https://developer.adobe.com/commerce/webapi/graphql/schema/cart/mutations/add-products/

2
  • getting this error: 1 exception(s):\nException #0 (GraphQL\\Error\\SyntaxError): Syntax Error: Unterminated string.\n\nException #0 (GraphQL\\Error\\SyntaxError): Syntax Error: Unterminated string.\n<pre>#1 GraphQL\\Language\\Lexer->readToken() called at [ Jul 3, 2023 at 14:37
  • Please share your schema and your resolver file. For more information. Please update your question.
    – Msquare
    Jul 3, 2023 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.