glideapps / graphql-samples

Sample code showing how to use quicktype for GraphQL
11 stars 2 forks source link

fix: update gql schema fetching parameters #4

Open szhigunov opened 4 years ago

szhigunov commented 4 years ago

Fixes instantiating the sample repository using setup.sh ( Error: Option parsing failed: Unknown option: --graphql-server-header ) Changes the outdated option param to a new one (--http-header).

szhigunov commented 4 years ago

There's the same problem in the article https://blog.quicktype.io/graphql-with-quicktype/.

+ curl -H "Authorization: Bearer $TOKEN" \
- curl -H “Authorization: bearer $TOKEN” \
     -X POST -d '{ "query": "query { viewer { login }}" }' \
     https://api.github.com/graphql
+ quicktype --http-header "Authorization: Bearer $TOKEN" \
- quicktype --graphql-server-header “Authorization: bearer $TOKEN” \
          --graphql-introspect https://api.github.com/graphql \
          --graphql-schema github.gqlschema