-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support application/x-www-form-urlencoded content-type for transforms #8097
Comments
FWIW, I think Postman's pre-existing thought work on this could be a good source of inspiration. How often does a person modify BOTH query params AND the body of the request? Does it warrant taking up separate space or could it be condensed into a tabbed interface to require less overall scrolling? |
Current Transform SchemaAs of PR #3475 in the mono repo, the syntax for body and header transforms is as follows: "request_transform": {
"request_method": "GET",
"body": {
"action": "remove"
},
"request_headers": { "foo": "bar", "content-type": "application/json"},
"engine": "kriti"
} "request_transform": {
"request_method": "GET",
"body": {
"action": "transform",
"template": "{{ $body.foo }}"
},
"request_headers": { "foo": "bar", "content-type": "application/json"},
"engine": "kriti"
} Additionally, the Important Properties of this designThe lack of implicit back-end behavior is a very desirable property to maintain. It simplifies the technical implementation, removes edge cases (and the need to test them), and it leads to overall less surprising behavior for users. It also allows users to generate atypical requests so long as they conform to the HTTP Spec. From the console user's perspective we can recover all the convenience of implicit back-end behaviors by moving those behaviors into explicit front-end behaviors. For example, if we want to change the Proposal for
|
@solomon-b I like the above proposal with respect to handling The only thing I am not sure about is using |
API support is now in server since the latest beta. Console work is in-progress. |
@sordina I am using
|
hey @johndevs with the new api update, you could change the
|
closed via b09bb60 |
Currently, payload transforms in REST connectors have
content-type: application/json
. We should supportapplication/x-www-form-urlencoded
as well. This is described in brief in the initial RFC: https://github.com/hasura/graphql-engine/blob/master/rfcs/transforms.md (see Example 5)Open questions:
body
API to reflect form urlencoded natively? (i.e. key value pairs)escape()
function?Note: The docs wrongly suggests that
x-www-form-urlencoded
is already supported: https://hasura.io/docs/latest/graphql/core/actions/transforms.html#content-typeThe text was updated successfully, but these errors were encountered: