For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom Scalars

How to write resolvers for custom scalars

Scalars used in your schema can be returned after being processed by a custom resolver function first. This is optional and by default, they are returned without a type check.

{
    "scalars":{
        "CUSTOM_SCALAR_NAME":{
            "parse":{
                "name": "PATH_TO_RESOLVER"
            },
            "serialize":{
                "name": "PATH_TO_RESOLVER"
            }
        }
    }
}

Last updated

Was this helpful?