Coder Social home page Coder Social logo

graphql-config-examples's Introduction

graphql-config-examples's People

Contributors

czterystaczwarty avatar jimkyndemeyer avatar pkuczynski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphql-config-examples's Issues

Schema Discovery?

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?

Screen Shot 2020-05-10 at 12 15 24 PM

Replicate behaviour of Relay support in custom similar cases [Question]

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.

looking for an example with remote WSS and HTTP links

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?

Support for remote schema authentication but pull token from $ENV or .env or similar?

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?

Any ways to make this get schema from the server?

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.

Screen Shot 1401-09-13 at 21 30 07

The problem is that after that file is generated my source schema files give duplicated errors all over the place.

Screen Shot 1401-09-13 at 21 32 01

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
      }
    }
  }
}

Introspection query malformed

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:

image

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?

schema.json

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

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.