laravel-graphql-playground | Easily integrate GraphQL Playground into your Laravel | GraphQL library
kandi X-RAY | laravel-graphql-playground Summary
kandi X-RAY | laravel-graphql-playground Summary
Easily integrate GraphQL Playground into your Laravel projects. Please note: This is not a GraphQL Server implementation, only a UI for testing and exploring your schema. For the server component we recommend nuwave/lighthouse.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Bootstrap the application .
- Handle CSS .
- Force the contents of a file .
- Load routes from path .
- Register the graph commands .
- Get asset path .
- Get the config path .
- Get the resource path .
- Get the JavaScript path .
- Get the CSS path .
laravel-graphql-playground Key Features
laravel-graphql-playground Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-graphql-playground
QUESTION
I 'm using Laravel 5.7 to make an API
I 'm using swagger to make the documentation
composer require :
...ANSWER
Answered 2020-Sep-11 at 12:30The requestInterceptor
function must have one argument, say, req
. This argument provides access to the request data. The function must return the modified request.
QUESTION
I'm using lighthouse-php to make a graphql api and I'm having a trouble changing middleware (it will be deprecated in new versions) directive to guard.
...ANSWER
Answered 2020-May-01 at 13:54In the meantime I've found another solution mentioned in the documentation:
https://lighthouse-php.com/master/security/authentication.html#global
So in short, I needed to add the AttemptAuthentication middleware to the lighthouse config. I use this with @auth(guard: "api") added to all my types.
QUESTION
I have the following problem trying to install rebing/graphql-laravel via composer:
...ANSWER
Answered 2019-Oct-14 at 06:31It seems that rebing/graphql-laravel
require webonyx/graphql-php
on version more than 0.13
.
It seems also that webonyx/graphql-php
is already required in your composer file so you need to update the sub-dependency with
composer update webonyx/graphql-php rebing/graphql-laravel
QUESTION
I'm following the tutorial on Lighthouse website for the master version (4.1).
https://lighthouse-php.com/4.1/getting-started/tutorial.html#installation
I make a fresh intallation of Laravel 5.8, then I execute the commands written in the tutorial (beside npm install
)
composer require nuwave/lighthouse mll-lab/laravel-graphql-playground
php artisan vendor:publish --provider="Nuwave\Lighthouse\LighthouseServiceProvider"
php artisan vendor:publish --provider="MLL\GraphQLPlayground\GraphQLPlaygroundServiceProvider"
after that a /graphql/schema.graphql
file is created (under the project root, not under the routes
folder as happened with the previous versions).
Now I populate the DB with some data and then I copy/paste the schema from the tutorial page to the published schema, I start the server, then I access playground which shows the correct url where to send the requests http://127.0.0.1:8000/graphql
.
Clicking on the Schema
tab I always see the default schema and not the one published in /graphql/schema.graphql
, and of course the queries for the resources different from the users fails with an error like Cannot query field "posts" on type "Query".
. I've already tried restarting the server and refreshing the Playground page.
Into the config/lighthouse.php
file the schema is registered to the path base_path('graphql/schema.graphql')
which looks correct.
Why Playground always shows the default schema and not the published and edited one?
I'm using PHP 7.2.14 and Lighthouse requires PHP>7.1
...ANSWER
Answered 2019-Aug-21 at 03:23I thought the problem is related to the caching. I tried to add LIGHTHOUSE_CACHE_ENABLE=false
to the laravel .env file and restart the server then refresh the playground page. I recheck the schema and it is updated.
I hope it's useful.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install laravel-graphql-playground
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page