Comments (13)
For some reason csrf_token()
is returning empty/null so the meta content is empty. The token is working everywhere outside of GraphQL Playground. Did I miss something in your steps?
Edit: I needed to enable the web
middleware to the config for this package. I'm still unable to get the @auth
directive to work, though, but that may be out of the scope of this issue.
from laravel-graphql-playground.
Is there any reason not to enable CSRF? We might just add it in statically.
Not too sure about the request.credentials
, why is that needed?
from laravel-graphql-playground.
Well In cases where you don't use CSRF, I think it might fail when trying to generate the token? Not really sure about it as I always use CSRF.
The request.credentials
with same-origin
defines if it should pass the headers from the current request to all request it makes to graphql. This is needed to pass the cookies header with session id to all request to graphql
from laravel-graphql-playground.
Looks like Laravel includes it by default, so i think we should do the same. It can be removed from the published view file if it is not wanted. Can you send a PR?
I enhanced the README with some info about how to add arbitrary settings. I don't want to duplicate all the settings in the config file, as it would be hard to maintain.
from laravel-graphql-playground.
@spawnia Ah sure, let's do that then.
I'll first be able to make a PR in a couple of days, else I don't mind that you do it :)
from laravel-graphql-playground.
@olivernybroe nah i am good with waiting 😉
from laravel-graphql-playground.
@olivernybroe Any progress on this? We would also benefit from being able to authenticate via session, and I'm not sure I have as strong a grasp as you do as to what's necessary.
from laravel-graphql-playground.
@JasonTheAdams yeah sorry, I really haven't had time and forgot all about this.
If anybody else wants to then please create the pr :)
Hmm sounds wierd, did you change the init config?
from laravel-graphql-playground.
@olivernybroe Yeah, I changed the init config. The token is displaying by this point, but I found that this package view triggers a different session than the one otherwise used for the other pages. Pretty strange.
from laravel-graphql-playground.
Open for PR's.
from laravel-graphql-playground.
@spawnia If I can figure out how to get it to use the same session then I'll definitely look to submit a PR. If you can give me a lead of any kind I would appreciate it. I'm not sure how Laravel determines which session to use during a request.
from laravel-graphql-playground.
So I was actually about to make a PR for this. Then I realized that the view can be published and overwritten with exactly these details. Seems like that may be an adequate solution?
from laravel-graphql-playground.
So I was actually about to make a PR for this. Then I realized that the view can be published and overwritten with exactly these details. Seems like that may be an adequate solution?
@JasonTheAdams , could you expand on this? I have published the graphql-playground view but still cannot get any query with @auth
to work correctly.
from laravel-graphql-playground.
Related Issues (20)
- Add setting for weboscket to subscription HOT 3
- Add a documentation to explain how to add default request headers HOT 2
- Laravel 5.8 Support - Problem with Route HOT 3
- How to enable the multi env side panel? HOT 1
- Include table name on where directive HOT 1
- How to use with Sanctum? HOT 2
- JavaScript Error when clicking "copy curl" HOT 2
- Suggestion: consider a debug tab HOT 2
- Publish package under different tag name HOT 1
- is there any file picker or way to upload files? HOT 2
- Not support for laravel 8 HOT 3
- Method signature issues in GraphQLPlaygroundServiceProvider#loadRoutesFrom HOT 2
- Add functionality to provide the subscription endpoint. HOT 3
- Update headers HOT 3
- Exclude mutation from playground HOT 1
- Laravel GraphQl getting Could not connect to websocket endpoint error HOT 2
- Announcement "Retiring Graphql Playground" HOT 6
- playground over https
- Couldn`t open schema and docs tabs on production server (infinitely loading content) HOT 6
- laravel 10 support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-graphql-playground.