1

How to define details array in the below request:

query{
 results(
 id: "56",
 details: 
 {
 name: "yamini",
 bloodGroup: "AB+"
 age:25
 }
 )
 {
 message
 }
}
Msquare
9,4627 gold badges30 silver badges71 bronze badges
asked Jul 3, 2023 at 13:57

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/

answered Jul 3, 2023 at 14:25
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 [ Commented Jul 3, 2023 at 14:37
  • Please share your schema and your resolver file. For more information. Please update your question. Commented Jul 3, 2023 at 15:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.