Open SaiRO97 opened 4 years ago
Hello, I have categories in the project. I need to get all fields from an endpoint in graphql. But the schema does not generate correctly, the children field at my endpoint always returns an empty array when I make a request
children
data from server
[ { "id": 1, "nameI18nId": 238, "slug": "test", "name": { "id": 238, "en": "Test", "ru": "Тест" }, "children": [ { "id": 10, "nameI18nId": 548, "slug": "product-category-name", "name": { "id": 548, "en": "product category name", "ru": "категория продукта" }, ] ]
gatsby config file
{ resolve: `gatsby-source-apiserver`, options: { url: process.env.PAYFORM_API_URL, method: 'get', typePrefix: 'internal__', name: 'payform', headers: { 'Content-Type': 'application/json', }, verboseOutput: true, entitiesArray: [ { url: `${process.env.PAYFORM_API_URL}product`, method: 'get', headers: { 'Content-Type': 'application/json', }, typePrefix: 'internal__', name: `products`, }, { url: `${process.env.PAYFORM_API_URL}product-category`, method: 'get', headers: { 'Content-Type': 'application/json', }, typePrefix: 'internal__', name: `categories`, }, ], },
How can I get data in the children field? If you have any ideas, please let me know how I can fix this. thanks
Hello, I have categories in the project. I need to get all fields from an endpoint in graphql. But the schema does not generate correctly, the
children
field at my endpoint always returns an empty array when I make a requestdata from server
gatsby config file
How can I get data in the children field? If you have any ideas, please let me know how I can fix this. thanks