1. 14
    Query Data by Property with GraphQL and Fauna in Next.js
    3m 20s

Query Data by Property with GraphQL and Fauna in Next.js

InstructorShadid Haque

Share this video with your friends

Send Tweet

It would be great to show a list of shops that a vendor has created. To do this we will need to create a new query getShopsByOwnerId that accepts a string that will be our user id. Like before, we'll merge this schema change into Fauna and update our roles to make this request.

On the frontend we'll create a shop list component and pass in the user token that Auth0 gives us for the logged in user.

Amo0ory
~ 2 years ago

Hi Shadid Haque, hope you are well, I am encountering a strange error when calling the getShopsByOwnerId query, I get Permission Denied whenever I refresh the page, this issue only occurs in the manage-shops page, however, when I call it from the home page I do get all the shops

Shadid Haqueinstructor
~ 2 years ago

Please check if you are using the correct token from Auth0. Please share your code and I can take a look.