Catch the highlights of GraphQLConf 2023! Click for recordings. Or check out our recap blog post.
Docs
Source Handlers
OData / Microsoft Graph

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)