Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @martinheld martinheld renamed this gist Mar 28, 2021. 1 changed file with 0 additions and 0 deletions.
  2. @martinheld martinheld revised this gist Mar 28, 2021. No changes.
  3. @martinheld martinheld revised this gist Mar 28, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion GraphlQL introspection query via curl.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # GraphlQL introspection query via curl
    # GraphQL introspection query via curl

    `cat introspection_query.json`

  4. @martinheld martinheld created this gist Aug 8, 2019.
    101 changes: 101 additions & 0 deletions GraphlQL introspection query via curl.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,101 @@
    # GraphlQL introspection query via curl

    `cat introspection_query.json`

    ```json
    {
    "query": "query IntrospectionQuery {
    __schema {
    queryType { name }
    mutationType { name }
    subscriptionType { name }
    types {
    ...FullType
    }
    directives {
    name
    description
    locations
    args {
    ...InputValue
    }
    }
    }
    }

    fragment FullType on __Type {
    kind
    name
    description
    fields(includeDeprecated: true) {
    name
    description
    args {
    ...InputValue
    }
    type {
    ...TypeRef
    }
    isDeprecated
    deprecationReason
    }
    inputFields {
    ...InputValue
    }
    interfaces {
    ...TypeRef
    }
    enumValues(includeDeprecated: true) {
    name
    description
    isDeprecated
    deprecationReason
    }
    possibleTypes {
    ...TypeRef
    }
    }

    fragment InputValue on __InputValue {
    name
    description
    type { ...TypeRef }
    defaultValue
    }

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

    `curl -i -X POST http://localhost:8080/graphql -H "Content-Type: application/json" -d @introspection_query.json`