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

[oData Handler] Implementation of calling an single entity is not correct #3770

Open
chrisweirich opened this issue Mar 28, 2022 · 0 comments

Comments

@chrisweirich
Copy link

When a single entity is called, the odata service is not called according to the specified odata protocol. With very strict odata services (e.g. SAP) this leads to errors.

Protocol: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html#sec_Entity

http://host/service/Customers(1)

Implementation graphql mesh odata handler

http://host/service/Customers/1/

Suggestion
https://github.com/Urigo/graphql-mesh/blob/master/packages/handlers/odata/src/index.ts#L441

        function addIdentifierToUrl(url, identifierFieldName, identifierFieldTypeRef, args) {
            // Only round brackets are allowed and a string must be surrounded with '
            url.href += (typeof args[identifierFieldName] === 'string') ? `('${args[identifierFieldName]}')` : `(${args[identifierFieldName]})`;
        }
@theguild-bot theguild-bot mentioned this issue Aug 11, 2022
@theguild-bot theguild-bot mentioned this issue Sep 28, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant