Hi everyone.
I have a question about requests to the Customer Account API.
I want to retrieve subscriptionContract data using ‘subscriptionContracts’.
However, I get the response “Field ‘subscriptionContracts’ doesn’t exist on type ‘Customer’”.
and I cannot retrieve the data.
query MyQuery {
customer {
subscriptionContracts(first: 10) {
nodes {
id
createdAt
nextBillingDate
status
}
}
}
}
{
"errors": [
{
"message": "Field 'subscriptionContracts' doesn't exist on type 'Customer'",
"locations": [
{
"line": 3,
"column": 5
}
],
"path": [
"query MyQuery",
"customer",
"subscriptionContracts"
],
"extensions": {
"code": "undefinedField",
"typeName": "Customer",
"fieldName": "subscriptionContracts"
}
}
]
}
Other data, such as displayname, can be retrieved with no problem.
{
customer {
displayName
}
}
I am using Customer Account API version 2024-1.
(and using graphiql)
I cant figure out why this is happening, please tell me where the problem is.
Thank you for your support!