-
Notifications
You must be signed in to change notification settings - Fork 0
Generating types
Aaron Aichlmayr edited this page Mar 26, 2019
·
1 revision
There are two methods on instances of the ODataResolver class which can be used for generating types:
- GetQueryType
- This will include all EntitySet and Singleton elements on the EntityContainer
- GetMutationType
- This currently only contains a placeholder
Both methods take the same set of arguments:
- A prefix added to all types
- The base url, this should be the same as the metadata url without
$metadata - Optional: An action which gets run between parsing the GraphQL query but before translating that query into OData, this can be used to ensure all tokens are available which are required for the request
- Optional: A function which can be used to adjust the HttpRequestMessage object immediately before the request is made
- Optional: An action which can be used to update all graph types. This can be very useful when used in conjunction with other GraphQL libraries which add additional metadata