Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GraphQL Sample to use application/xml against Jetsons service #408

Merged
merged 3 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/tutorial/graphqlclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ sources:
handler:
odata:
baseUrl: https://jetsons.azurewebsites.net/
schemaHeaders: { "accept": "application/xml" }
```

Note the schemaHeaders line. GraphQL Mesh currently supports only the [XML CSDL metadata format](https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html). Since the Jetsons service defaults to the JSON format, the `accept` header is required in order to force the service to return metadata in the `application/xml` format.

More information on configuring the Handler can be found in the [OData Handler Documentation](https://www.graphql-mesh.com/docs/handlers/odata).

## Preview your service with GraphQL
Expand Down
3 changes: 2 additions & 1 deletion samples/GraphQL_Client/.meshrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
- name: Jetsons
handler:
odata:
baseUrl: https://jetsons.azurewebsites.net/
baseUrl: https://jetsons.azurewebsites.net/
schemaHeaders: {"accept":"application/xml"}
Loading