Error 500 about GraphQL request

Hi,

I’m working on a custom application and i got an error 500 when trying to get product with GraphQL API, the code is from Laravel Shopify sample.

i have log the error in the console and i got a JS error object:

message Cannot handle token prior to 2022-06-17T16:06:39+0000

Exception: Firebase\JWT\BeforeValidException

The query was:

products(first: 10) {
        edges {
            cursoro
            node {
                id,
                title,
                onlineStoreUrl
            }
        }
    }

Thank you for reading

Hey @Ectaclick - thanks for getting in touch. I might have a solution for you, can you try giving the following query a go?

{
    products(first: 10) {
        edges {
            cursor
            node {
                id,
                title,
                onlineStoreUrl
            }
        }
    }

If you’re making a basic root query, you’ll want to double check that you have that “{” on the first line of your query in order to open it. I also noticed there looks like there’s an extra “o” in “cursor”, so that could have potentially caused the issue too. Let us know if this helps or if you encounter any further issues - happy to help when we can.

Take care!

Hi,

I added the brackets and remove the cursor word and i got the same error in JS console, you can see my code if you need:

https://github.com/Ectaclick/ectaclick.myshopify.com-devapp_php

The code is in the file: resources/js/components/ProductPage.jsx

I think it’s a problem with my Auth and my session_token

Thank you for help