dev-master
9999999-dev https://github.com/twohill/silverstripe-phpstorm-graphqlHelper to allow PHPStorm GraphQL lookups
BSD-3-Clause
The Requires
by Al Twohill
silverstripe phpstorm graphql
Helper to allow PHPStorm GraphQL lookups
This module allows you to use JS GraphQL within your SilverStripe project., (*1)
It does this by providing another authenticator that lets JS GraphQL query the schema without logging in. There might be a better way of going about this - I'm all ears!, (*2)
To provide some sort of security, by default we restrict to queries from localhost, with the user-agent "JS GraphQL", and only in dev mode., (*3)
Install the JS GraphQL plugin Install this helper, (*4)
composer require twohill/silverstripe-phpstorm-graphql
Create a graphql.config.json
with the following details (update the URL as required), (*5)
{ "schema": { "request": { "url": "http://localhost/graphql", "method": "POST", "postIntrospectionQuery": true, "options": { "headers": { "user-agent": "JS GraphQL", "Origin": "localhost" } } } }, "endpoints": [ { "name": "Default (http://localhost/graphql)", "url": "http://localhost/graphql", "options": { "headers": { "user-agent": "JS GraphQL", "Origin": "localhost" } } } ] }
Edit some GraphQL and see some lovely schema completion :), (*6)
See License, (*7)
If you want to override any of the security settings you can do so via yaml., (*8)
Twohill\PhpStormGraphQL\PhpStormDevAuthenticator: allowed_ips: - '127.0.0.1' allowed_useragent: 'JS GraphQL' allowed_environment: 'dev'
Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique., (*9)
If the issue does look like a new bug:, (*10)
Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker., (*11)
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers., (*12)
Helper to allow PHPStorm GraphQL lookups
BSD-3-Clause
silverstripe phpstorm graphql