The folders in this repository demonstrate how to setup schema discovery for JS GraphQL IntelliJ Plugin using graphql-config v2 .graphqlconfig
files.
See the README.md
in each project folder for details.
For additional information see:
The folders in this repository demonstrate how to setup schema discovery for JS GraphQL IntelliJ Plugin using graphql-config v2 .graphqlconfig
files.
See the README.md
in each project folder for details.
For additional information see:
Hi, wonderful library, but I've spent the day trying to get your plugin to work and I'm getting nowhere. I understand that I am expected to have a .graphqlconfig file, so here's mine:
{
"name": "Untitled GraphQL Schema",
"schemaPath": "schema.graphql",
"includes": ["src/**.**"],
"extensions": {
"endpoints": {
"Default GraphQL Endpoint": {
"url": "http://dev.shmax.com/graphql/?XDEBUG_SESSION_START=1",
"introspect": true
}
}
}
}
I don't work with SDL or even .graphql files at this point; I simply want your tool to use an introspection query to load my schema into memory and gain knowledge of all the types in it so that auto-completion will work when I edit inline queries (much like ichromiql does) . I'd rather that no "schema.graphql" file were involved in this process at all, but If I understand correctly your tool will generate it automatically if introspect
is true
. Do I have that right?
Well, something weird is going on. In a normal introspection request initiated by ichromiql, we get something like this from the file stream:
"{\"query\":\"\\n query IntrospectionQuery {\\n __schema {\\n queryType { name }\\n mutationType { name }\\n subscriptionType { name }\\n types {\\n ...FullType\\n }\\n directives {\\n name\\n description\\n locations\\n args {\\n ...InputValue\\n }\\n }\\n }\\n }\\n\\n fragment FullType on __Type {\\n kind\\n name\\n description\\n fields(includeDeprecated: true) {\\n name\\n description\\n args {\\n ...InputValue\\n }\\n type {\\n ...TypeRef\\n }\\n isDeprecated\\n deprecationReason\\n }\\n inputFields {\\n ...InputValue\\n }\\n interfaces {\\n ...TypeRef\\n }\\n enumValues(includeDeprecated: true) {\\n name\\n description\\n isDeprecated\\n deprecationReason\\n }\\n possibleTypes {\\n ...TypeRef\\n }\\n }\\n\\n fragment InputValue on __InputValue {\\n name\\n description\\n type { ...TypeRef }\\n defaultValue\\n }\\n\\n fragment TypeRef on __Type {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n ofType {\\n kind\\n name\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n }\\n\"}"
Beautiful.
But when I trigger one from within PHPStorm using this:
The file stream returns this:
"{\"query\":\"http:\\\/\\\/dev.shmax.com\\\/graphql\\\/?XDEBUG_SESSION_START=1\"}"
Which is clearly not right. Any idea what I'm doing wrong?
Is this possible?
${env:GRAPHQL_URL-https://somesite.com/graphql}
Hello,
I try to get autocompletion up and running on both, websocket and http connection.
I tried following:
{
"schemaPath": "schema.graphql",
"extensions": {
"endpoints": {
"Default Introspection Endpoint": {
"url": "https://gql-api.myserver.com/v1/graphql",
"subscription": {
"url": "wss://gql-api.myserver.com/v1/graphql"
},
"introspect": true,
"headers": {
"user-agent": "JS GraphQL",
}
}
}
}
}
But I still don't see completion in subscriptions so far. Any idea what I am doing wrong in my setup?
Hi, is it possible to add header to request. I haven using this pluging, and it is really helpful, but once I added jwt I havent been able to run my request directly
Hi Jim,
just wanted to ask if there's a way to achieve the same behaviour of Relay support but for custom directivas.
For example:
type Something {
name: String
}
type Query {
all: SomethingCollection @collection (for: "Something")
}
So "SomethingCollection" is marked as an error, but as that type is created programatically program works.
Thanks,
Pedro.
Is there support for schema.json?
That format is used by Apollo. Since I can't make plugin work with it, the apollo example seems to be a bit misleading. Is there any workaround?
Thanks
I have a schema named schema.js
located at imports/startup/server/api/schema.js
. In the GraphQL tab I see "Schema discovery summary - schema is empty". When I double-click it, I have the option to search project-wide for the schema file. I entered schema.js
in the dialog box, but it says "No matches found".
How can I correct this?
I figured out how to authenticate to a remote endpoint that requires authentication, in my case...
"Default GraphQL Endpoint": {
"url": "https://remote.graphql.nd/api/graphql",
"headers": {
"user-agent": "JS GraphQL",
"Authorization": "Bearer [supersecretsecret]"
...but I need to share my project in my organization and you know how people get about storing credentials in repos ;=)
Is it possible to use an auth header from a .env file or $ENV in the .graphqlconfig?
I love this plugin it's awesome, but can't get it to work with some types that are dynamically generated, it just works with .graphql files but that's not enough :(
Yes I can press this button and it does generate a file which fixes everything.
The problem is that after that file is generated my source schema files give duplicated errors all over the place.
Is there any ways that I can make this work?
{
"name": "Untitled GraphQL Schema",
"schemaPath": "./schema.graphql",
"extensions": {
"endpoints": {
"Default GraphQL Endpoint": {
"url": "http://graphql.test/wp-json/central/api/graphql",
"headers": {
"user-agent": "JS GraphQL"
},
"introspect": true
}
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.