GithubHelp home page GithubHelp logo

Comments (8)

bricemacias avatar bricemacias commented on May 22, 2024 5

Yes ! It's working, thank you :)))

from orca.

DimiMikadze avatar DimiMikadze commented on May 22, 2024 2

Found the solution, you will need to add authorization token in GraphQL Playground HTTP HEADERS like this.

{
  "authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmdWxsTmFtZSI6IkRpbWkgTWlrYWR6ZSIsImVtYWlsIjoiZGltaUBnbWFpbC5jb20iLCJpYXQiOjE1NzE1OTEwNjMsImV4cCI6MTYwMzE0ODY2M30.xPOeoV8-k0hzgNq9n_XPAdJxQTQy69imVnaQQER8S0Y"
}
  1. Sign up in the app
  2. Get the auth token by writing localStorage.getItem('token'); in Browsers console
  3. Go to GraphQL Playground click HTTP HEADERS near to QUERY VARIABLES
  4. Paste the above mentioned code by replacing token value with the one you get from console

from orca.

DimiMikadze avatar DimiMikadze commented on May 22, 2024

Hi, I've tried to create new app with npx and then navigate to http://localhost:4000/graphql and it worked for me. Usually the error you are receiving means that you have protected that route with authentication token and you need to use it to access it, maybe you've changed something in the codebase?

from orca.

bricemacias avatar bricemacias commented on May 22, 2024

Hi, I just tested again, created a complete new application with npx and I still get the same error. Nothing was changed in the codebase.

The application works though, add user, add post, follow... just the GraphQL Playground that throws the same error

from orca.

DimiMikadze avatar DimiMikadze commented on May 22, 2024

are you able to open GraphQL Playground in other projects?

from orca.

bricemacias avatar bricemacias commented on May 22, 2024

Yes, I just created a simple server like this and it works :

Capture d’écran 2020-01-07 à 20 43 16

Capture d’écran 2020-01-07 à 20 43 57

And when using the project, even from scratch with npx and yarn start, I get this :

Capture d’écran 2020-01-07 à 20 47 40

With still the same error in console : "jwt must be provided" :/

from orca.

hadimsamir avatar hadimsamir commented on May 22, 2024

Yii! Thank you Mr: Mikadze

from orca.

letoribo avatar letoribo commented on May 22, 2024

i have the same error, but in production:
JsonWebTokenError

from orca.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.