v0Source HandlersOData / Microsoft Graph
⚠️
This is the documentation for the old GraphQL Mesh version v0. We recommend upgrading to the latest GraphQL Mesh version v1.

Migrate to GraphQL Mesh v1

OData / Microsoft Graph

image

This handler allows you to load remote OData metadata/schema as GraphQL Schema.

To get started, install the handler library:

npm i @graphql-mesh/odata

Now, you can use it directly in your Mesh config file:

.meshrc.yaml
sources:
  - name: TripPin
    handler:
      odata:
        endpoint: https://services.odata.org/TripPinRESTierService/

Headers

Read about configuration and examples

CodeSandBox Example

You can check out our TripPin example that uses the OData handler.

Config API Reference

  • endpoint (type: String, required) - Base URL for OData API
  • source (type: String) - Custom $metadata File or URL
  • schemaHeaders (type: JSON) - Headers to be used with the $metadata requests
  • operationHeaders (type: JSON) - Headers to be used with the operation requests
  • batch (type: String (multipart | json)) - Enable batching
  • expandNavProps (type: Boolean) - Use $expand for navigation props instead of seperate HTTP requests (Default: false)