OData / Microsoft Graph

image

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

To get started, install the handler library from NPM:

$ yarn add @graphql-mesh/odata

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

sources:
- name: TripPin
handler:
odata:
baseUrl: https://services.odata.org/TripPinRESTierService/

Codesandbox Example

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

Config API Reference

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