2021-10-02

MongoDB Realm - GraphQL custom resolver specification for Mongo Atlas Search index highlight results

 "highlights_field_name": {

  "type": "array",

  "items": {

    "type": "object",

    "title": "highlights_title",

    "properties": {


      "path": {

        "type": "string"

      },


      "score": {

        "type": "number"

      },


      "texts": {

        "type": "array",

        "items": {

          "type": "object",

          "title": "piece_texts",


          "properties": {

            "value": {

              "type": "string"

            },

            "type": {

              "type": "string"

            }

          }


        }

      }


      

    }

  }

}


Mongo Realm - Custom resolver payload specification for a field that returns an array of strings

 "field_name": {

  "type": "array",

  "items": {

    "type": "string"

  }

}



Mongo Realm - Custom resolver payload specification for a field that returns an array of two integers

This is the specification for such field:

"field_name": {

"type": "array",

"items": {

"type": "integer",

"type": "integer"

}

}