Open baiciluigi opened 1 month ago
up!
This is causing the grapqhl calls not to work, at least for me none of them works.
{"errorMessage":"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided."}
Can you please explain in detail with some screen shots?
The first post contains all the details. It's sending a string with \n
values in it, it should just do a json stringify on the variables object instead.
Try like this
{ "query": "mutation SignIn($email: String!, $password: String!){generateCustomerToken(email: $emailpassword: $password) {token}}", "variables": { "email": "SAMPLE@EMAIL.COM", "password": "SAMPLE_PASS" } }
or use like this
{ "query": "mutation SignIn($email: String!, $password: String!){generateCustomerToken(email: $emailpassword: $password) {token}}", "variables": "{\"email\": \"SAMPLE@EMAIL.COM\",\"password\": \"SAMPLE_PASS\"}" }
Why is this closed? We can't send the request manually, it's done via UI... When you select "Graphql" and input values into the "Variables" field. This fails because variables are sent the wrong way
This seems to be the standard behaviour of the developer. Happened in other issues, too. He/she/they write(s) a comment and close(s) the issue. In my case it was just a "I don't know what your problem is, it works for me." – ticket closed. Not nice.
I asked what are steps you are doing in step by step screen shots. You should have told that you are using Graphql from the body. Simple steps to replicate will avoid these kind of closures. Thanks for understanding
Also im trying my best to help the developer community @metawops with my extension. If you don’t like my extension please don’t use.
QUERY:
mutation registerOwnerPortal($market: Market!, $registerOwnerPortalInput: RegisterOwnerPortalInput!, $training: Boolean!) { ProfileMutations { registerOwnerPortal( market: $market registerOwnerPortalInput: $registerOwnerPortalInput training: $training ) { status typename } typename } }
VARIABLES:
{ market: { lang: "en", region: "us", brand: "test", application: "ncar", dealerId: "test", salesUserFullName: "Danilo" }, training: false, registerOwnerPortalInput: { opportunityKey: 8524761, clientKey: 7652140, salesUserFullName: "Danilo", custVehInfo: { firstName: "James", lastName: "Vonteps", address: { addressLine1: "1234 Fake St.", city: "BIRMINGHAM", region: "MI", postalCode: "48009", country: "US" }, mobileNumber: "6666666666", email: "john.doe@gmail.com", password: "test/NUAyhGrb4qTsLPvwG3ymnnVt5crBoPtQ2hQGiky+/THJTy/test=", termsAndConditions: false, vehicle: { vin: "test" }, customAttributes: { accountSource: "" }, marketingConsent: false } } }
Hi! The graphql variables are sent as a string instead of an object, which causes issues for most applications. In this case we're using magento 2 graphql API.
Here's the axios code generated:
Variables should be sent as an object instead (This is from VS Code Thunder Client)
Any word on this?