Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/apollo header support #209

Merged
merged 6 commits into from
May 8, 2020

Conversation

mwarger
Copy link
Contributor

@mwarger mwarger commented Apr 14, 2020

Fixes #151

Adds support for --header flag to CLI. Example:

mst-gql --header=X-Hasura-Admin-Secret:supersecret

Adds support for a header in a config object. Example (in config or package.json):

"mst-gql": {
    "input": "http://localhost:8080/v1/graphql",
    "format": "ts",
    "outDir": "src/models",
    "roots": [
      "todos",
      "otherthings"
    ],
    "header": {
      "x-hasura-admin-secret": "supersecret",
    }
  }

Feedback is welcome.

@chrisdrackett chrisdrackett self-requested a review April 15, 2020 16:50
Copy link
Collaborator

@chrisdrackett chrisdrackett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, I just found one issue. Thanks for fixing some typos as well :)

generator/config.js Outdated Show resolved Hide resolved
@mwarger
Copy link
Contributor Author

mwarger commented Apr 24, 2020

@chrisdrackett - any thoughts on this?

@mwarger mwarger requested a review from chrisdrackett May 7, 2020 02:14
Copy link
Collaborator

@chrisdrackett chrisdrackett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure the tests and examples run,

Just did a quick test running example 1 and it fails with ReferenceError: defaultConfig is not defined.

@barbalex
Copy link
Contributor

barbalex commented May 8, 2020

The second this is published I will start my new project 🚀

@chrisdrackett chrisdrackett merged commit 2a5e34e into mobxjs:master May 8, 2020
@barbalex
Copy link
Contributor

barbalex commented May 9, 2020

Works like a charm. You guys are heroes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auth header when downloading the schema?
3 participants