Download the schema
You can save the full Strise Connect schema as a GraphQL SDL file, for example to generate a typed client. Downloading the schema does not need a token. You need curl and Node.js.
-
Make an empty folder and go into it.
-
Save this as
introspection-query.json. Keep the indentation.{"query": " query { __schema { queryType { name } mutationType { name } subscriptionType { name } types { ...FullType } directives { name description locations args(includeDeprecated: true) { ...InputValue } } } } fragment FullType on __Type { kind name description fields(includeDeprecated: true) { name description args(includeDeprecated: true) { ...InputValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields(includeDeprecated: true) { ...InputValue } interfaces { ...TypeRef } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { ...TypeRef } } fragment InputValue on __InputValue { name description type { ...TypeRef } defaultValue isDeprecated deprecationReason } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name ofType { kind name } } } } } } } } "} -
Download the schema:
curl -s https://graphql.strise.ai/connect/graphql \ -H 'Content-Type: application/json' \ -d @introspection-query.json \ -o introspection.json -
Install graphql-js:
npm init -y > /dev/null npm install graphql -
Convert the download to SDL:
node -e ' const g = require("graphql") const j = require("./introspection.json") console.log(g.printSchema(g.buildClientSchema(j.data))) ' > connect.graphql
The schema is now in connect.graphql.