Light
Dark
System
v4latest
v4latest
v3
v2
v1

Introspection

GraphQL introspection can be used to explore the exposed EdgeDB types and expresssion aliases. Note that there are certain types like tuple that cannot be expressed in terms of the GraphQL type system (a tuple can be like a heterogeneous “List”).

Consider the following GraphQL introspection query:

Copy
{
    __type(name: "Query") {
        name
        fields {
            name
            args {
                name
                type {
                    kind
                    name
                }
            }
        }
    }
}

Produces:

Copy
{
    "__type": {
        "name": "Query",
        "fields": [
            {
                "name": "Author",
                "args": [
                    {
                        "name": "id",
                        "type": {
                            "kind": "SCALAR",
                            "name": "ID"
                        }
                    },
                    {
                        "name": "name",
                        "type": {
                            "kind": "SCALAR",
                            "name": "String"
                        }
                    }
                ]
            },
            {
                "name": "Book",
                "args": [
                    {
                        "name": "id",
                        "type": {
                            "kind": "SCALAR",
                            "name": "ID"
                        }
                    },
                    {
                        "name": "isbn",
                        "type": {
                            "kind": "SCALAR",
                            "name": "String"
                        }
                    },
                    {
                        "name": "synopsis",
                        "type": {
                            "kind": "SCALAR",
                            "name": "String"
                        }
                    },
                    {
                        "name": "title",
                        "type": {
                            "kind": "SCALAR",
                            "name": "String"
                        }
                    }
                ]
            }
        ]
    }
}

The above example shows what has been exposed for querying with GraphQL.

Light
Dark
System

We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.