Giter VIP home page Giter VIP logo

Comments (7)

spawnia avatar spawnia commented on July 20, 2024 3

image

Does that answer your question?

from laravel-graphql-playground.

mfn avatar mfn commented on July 20, 2024

You configured a Laravel Middleware for it and tell graph-playground to use it via

// Which middleware to apply, if any
'middleware' => [
// 'web',
],

from laravel-graphql-playground.

sadhakbj avatar sadhakbj commented on July 20, 2024

This is not the solution that I need, this config will basically prevent me from viewing the playground.

I am using Laravel passport for JWT authentication.
Inside my schema.graphql i have the following query:

 categories: [Category] @all @middleware(checks: ["auth:api"])

I want to get access to this query in the same that we used to do for the restful APIS by passing the JWT token (probably from the playground for testing) .

The query in my playground to get the categories looks like:

query {
  categories {
  name
}
}

When I press the run button I get the following error:

"errors": [
    {
      "debugMessage": "Route [login] not defined.",
      "message": "Internal server error",
      "category": "internal",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "categories"
      ],

I want to implement the authentication using Laravel Lighthouse and playground.

from laravel-graphql-playground.

sadhakbj avatar sadhakbj commented on July 20, 2024

@spawnia I will give it a try.

I have created one issue on the lighthouse repository. I am getting error trying to implement the auth:api middleware:
nuwave/lighthouse#579

from laravel-graphql-playground.

spawnia avatar spawnia commented on July 20, 2024

Alright. It seems that this issue does not really concern this repo though, since it seems to be a more general problem with authentication. This is really only a thin integration layer for GraphQL Playground.

from laravel-graphql-playground.

josevalero avatar josevalero commented on July 20, 2024

imagen

@sadhakbj maybe that answer your question !!

from laravel-graphql-playground.

sadhakbj avatar sadhakbj commented on July 20, 2024

@josevalero yes the issue was solved long back

from laravel-graphql-playground.

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.