i have a full stack app that is built in PHP, MySQL, GraphQL, and Reactjs, i make the graphqql requests using fetch, my app works pretty well locally with no issues at all, and i wanted to host it on a free host to showcase it to an employer, but here the issues began, i had a query that takes a variable id and get’s products that’s associated with category of that id, it works only if the category with 2, if it’s 3 i get an error saying unexpected end of json input.
, i tried my best to debug it and find where the error is but no clue, here’s my query
<code>query($id: ID!) {
category(id: $id) {
id
name
products {
id
name
inStock: in_stock
gallery
description
attributes: attribute_sets {
id
name
type
items: attributes {
displayValue: display_value
value
id
}
}
prices {
amount
currency {
symbol
label
}
}
brand
}
}
}
</code>
<code>query($id: ID!) {
category(id: $id) {
id
name
products {
id
name
inStock: in_stock
gallery
description
attributes: attribute_sets {
id
name
type
items: attributes {
displayValue: display_value
value
id
}
}
prices {
amount
currency {
symbol
label
}
}
brand
}
}
}
</code>
query($id: ID!) {
category(id: $id) {
id
name
products {
id
name
inStock: in_stock
gallery
description
attributes: attribute_sets {
id
name
type
items: attributes {
displayValue: display_value
value
id
}
}
prices {
amount
currency {
symbol
label
}
}
brand
}
}
}