question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.14] Unable to specify headers when using schema from url

See original GitHub issue

Is your feature request related to a problem? Please describe. Tried updating from 0.13.0 to 0.14.0.
There are no docs for introspection Pugin and how to provide auth header.

Had this npm script for introspection: "gql-gen:introspect": "gql-gen --schema http://localhost:4000 --header \"Authorization:[key]\" --template graphql-codegen-introspection-template --out ./src/app/graphql/generated/gql-gen-schema.json"

CLI suggested following config:

schema:
  - "http://localhost:4000"
documents: []
config: {}
generates:
  ./src/app/graphql/generated/gql-gen-schema.json:
    config: {}
    plugins:
      - "introspection"
require: []

Describe the solution you’d like Add Docs for Introspection Plugin option and Auth header yaml config syntax.

Describe alternatives you’ve considered

roll back to 0.13.0

Additional context Also some frustration stitching together the new yaml config. Before I had the above introspect script and this generate script: "gql-gen:generate": "gql-gen --schema ./src/app/graphql/generated/gql-gen-schema.json --template graphql-codegen-apollo-angular-template --out ./src/app/graphql/generated/gql-types.ts src/app/graphql/graphql-queries/*.graphql"

Was trail and error to merge it into codegen.yml config:

schema: 
  - http://localhost:4000 
# not sure about Auth header syntax here
  - headers: 
    Authorization:
      - "Bearer [key]"
generates:
  ./src/app/graphql/generated/gql-gen-schema.json:
    plugins:
      - "introspection"
  generates:
    ./src/app/graphql/generated/gql-types.ts:
      config:
        noGraphqlTag: true
    schema:
      - ./src/app/graphql/generated/gql-gen-schema.json
    documents: ./src/app/graphql/graphql-queries/*.graphql
    plugins:
      - typescript-common
      - typescript-client
      - typescript-apollo-angular

And not even sure if this is correct.

Congrats for launching docs and site looks great!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dotansimhacommented, Nov 25, 2018

Fixed in 0.14.2 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebService Client Generation Error with JDK8 - Stack Overflow
Here is a hint Hint for gradle users without admin rights: add this line to your jaxb-task: System.setProperty('javax.xml.accessExternalSchema', 'all').
Read more >
Solved: Unable to read topic containing a csv file with on...
I am trying to read a kafka topic that contains a csv file with no headers. The file is read as it should...
Read more >
CREATE STREAM - ksqlDB Documentation
A stream can store its data in KEY , VALUE , or HEADERS ... Also, ksqlDB can use Schema Inference With ID to...
Read more >
Miscellaneous — Hoverfly Java 0.14.0 documentation
Miscellaneous¶ · Apache HttpClient¶ · OkHttpClient¶ · Spring 5 WebClient with Reactor Netty¶ · Spock Framework¶ · Legacy Schema Migration¶ · Migration to...
Read more >
How to Modify Schema Using Web Screen Painter - TechDocs
Open Schema Designer on WSP. Add a Table or Add a Column or Modify the Table or Column. Test Schema Modifications. If the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found