OData / Microsoft Graph
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 APIsource
(type:String
) - Custom $metadata File or URLschemaHeaders
(type:JSON
) - Headers to be used with the $metadata requestsoperationHeaders
(type:JSON
) - Headers to be used with the operation requestsbatch
(type:String (multipart | json)
) - Enable batchingexpandNavProps
(type:Boolean
) - Use $expand for navigation props instead of seperate HTTP requests (Default: false)