GraphQL

Send a graphql query or mutation

Changed on

Use the playground console to build and test your requests and see all the possibilies

post/graphql

Request

  • Base URL
    https://functions.prod.jarvi.tech/v1/public-api
  • URL
    https://functions.prod.jarvi.tech/v1/public-api/graphql
  • Auth
    API key in header X-API-KEY

Request body

operationNamestring

The name of the operation. Used for log and debugging. If not provided, will be the first word of the query or mutation

querystring

The graphQL query as a SourcesEnum. You can use the playground console to build and test your requests and see all the possibilies

variablesobject

If you have variables in your query or mutation, you can provide them here. You can use the playground console to build and test your requests and see all the possibilies

Example request

{
  "operationName": "fields",
  "query": "query fields($limit: Int, $offset: Int, $order_by: [fields_order_by!]!, $where: fields_bool_exp) {\n                    items: fields(\n                      limit: $limit\n                      offset: $offset\n                      order_by: $order_by\n                      where: $where\n                    ) {\n                      id\n                      createdAt\n                      updatedAt\n                      deletedAt\n                      name\n                      userId\n                      type\n                      order\n                      targetedEntity\n                      isHidden\n                      defaultValue\n                      purpose\n                      isMadeForSales\n                      isMadeForRecruitment\n                      values(where: {deletedAt: {_is_null: true}}, order_by: {name: asc}) {\n                        id\n                        fieldId\n                        name\n                        isDefault\n                        technicalValue\n                        __typename\n                      }\n                      parentId\n                      parent {\n                        id\n                        name\n                        isMadeForSales\n                        isMadeForRecruitment\n                        __typename\n                      }\n                      children(where: {deletedAt: {_is_null: true}}, order_by: {order: asc}) {\n                        id\n                        createdAt\n                        updatedAt\n                        deletedAt\n                        name\n                        userId\n                        type\n                        order\n                        targetedEntity\n                        isHidden\n                        defaultValue\n                        purpose\n                        isMadeForSales\n                        isMadeForRecruitment\n                        values(where: {deletedAt: {_is_null: true}}, order_by: {name: asc}) {\n                          id\n                          fieldId\n                          name\n                          isDefault\n                          technicalValue\n                          __typename\n                        }\n                        parentId\n                        parent {\n                          id\n                          name\n                          isMadeForSales\n                          isMadeForRecruitment\n                          __typename\n                        }\n                        __typename\n                      }\n                      __typename\n                    }\n                    total: fields_aggregate(order_by: $order_by, where: $where) {\n                      aggregate {\n                        count\n                        __typename\n                      }\n                      __typename\n                    }\n                  }",
  "variables": {
    "where": {
      "_and": [
        {
          "parentId": {
            "_is_null": true
          }
        },
        {
          "deletedAt": {
            "_is_null": true
          }
        }
      ]
    },
    "limit": 1000,
    "offset": 0,
    "order_by": {
      "order": "asc"
    }
  }
}

Response

GraphQL response (can contain errors)

dataobject
errorsobject

Changes

    • info

      api operation id runGraphqlOperation was added

    • info

      api tag GraphQL added

    • info

      added the non-success response with the status