# Cant import graphql schema get "Could not load GraphQL schema. Syntax Error: Expected Name, found String "id"

**URL:** <https://community.postman.com/t/cant-import-graphql-schema-get-could-not-load-graphql-schema-syntax-error-expected-name-found-string-id/45168>\
**Category:** Help Hub\
**Created:** [March 15, 2023, 3:27pm UTC](https://community.postman.com/t/cant-import-graphql-schema-get-could-not-load-graphql-schema-syntax-error-expected-name-found-string-id/45168 "2023-03-15T15:27:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nutmix](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@nutmix](https://community.postman.com/u/nutmix)\
**Post date:** [March 15, 2023, 3:27pm UTC](https://community.postman.com/t/cant-import-graphql-schema-get-could-not-load-graphql-schema-syntax-error-expected-name-found-string-id/45168/1 "2023-03-15T15:27:40Z")

</div>

When I try to import a graphql schema file, I get:

```auto
Could not load GraphQL schema.

Syntax Error: Expected Name, found String "id".

```

the schema file (myschema.json) is huge, but starts like this:

```auto
{
    "data": {
        "__schema": {
            "queryType": {
                "name": "Query"
            },
            "mutationType": {
                "name": "Mutation"
            },
            "subscriptionType": {
                "name": "Subscription"
            },
            "types": [
                {
                    "kind": "OBJECT",
                    "name": "Query",
                    "description": null,
                    "fields": [
                        {
                            "name": "meta",
                            "description": null,
                            "args": [],
                            "type": {
                                "kind": "OBJECT",
                                "name": "MetaResponse",

```

and ends like this:

```auto
                {
                    "name": "aws_lambda",
                    "description": "Tells the service this field/object has access authorized by a Lambda Authorizer.",
                    "locations": [
                        "OBJECT",
                        "FIELD_DEFINITION"
                    ],
                    "args": []
                }
            ]
        }
    }

```

i am pulling the schema using this query:

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

```

Ive run the schema through a json validator and it says its good.

Any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 12, 2024, 12:52pm UTC](https://community.postman.com/t/cant-import-graphql-schema-get-could-not-load-graphql-schema-syntax-error-expected-name-found-string-id/45168/2 "2024-12-12T12:52:15Z")

</div>

Closed on December 12, 2024, 12:52pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
