Add description to Custom Resolver

Hi!

I’m trying to extend the documentation of my Mongo Realm GraphQL API. This far the barebone Graphiql-interface has been enough, but I now wish to add descriptions to each query and custom resolver.

I tried to add the field “description” to my Custom Resolver, but the matching query in Graphiql Documentation Explorer still shows “No description”. As usual I can’t find any documentation on how the Custom Resolver json-files should be structured, so I’ll ask here instead. How can I populate my Graphiql Documentation Explorer with descriptions?

This is an example of what I’ve tried:

{
    "field_name": "xxx",
    "function_name": "xxxfunc",
    "id": "7f50d150df84be4a7ecd25bc",
    "description": "Lorem ipsum",
    "input_type_format": "custom",
    "input_type": {
        "title": "xxxtitle",
        "type": "object",
        "properties": {
            "xxx": {
                "bsonType": "string"
            },
            "xxx": {
                "bsonType": "string"
            },
            "xxx": {
                "bsonType": "string"
            }
        }
    },
    "on_type": "xxxtype",
    "payload_type": {
        "type": "object",
        "title": "xxx",
        "properties": {
            "result": {
                "bsonType": "boolean"
            },
            "error": {
                "bsonType": "string"
            }
        }
    },
    "payload_type_format": "custom"
}
2 Likes

Hey @petas - unfortunately there is no way to modify the custom resolver description field at the moment. I would encourage you to add that in our feedback forum. We monitor that pretty closely to help influence our features/roadmap.

2 Likes

Thanks @Sumedha_Mehta1. For anyone with the same wish, I posted the suggestion on the feedback forum here: GraphiQL Description field – MongoDB Feedback Engine

1 Like