You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have got a customer entity with a one-to-many-relation to an email-entity. Through the rest-api i am able to create the a new customer and the emails with a single request. Swagger already displays the correct arguments:
But when i go to Graphiql it tells me that it expects an array of strings as an argument for the emails:
The source of the problem is in the SchemaBuilder when the types are converted (https://github.com/api-platform/core/blob/master/src/GraphQl/Type/SchemaBuilder.php#L354). Because the input is true (createCustomerInput mutation) and the depth is 7 it always returns a GraphQl-StringType. I dont think that this is the right behaviour because the 7 isn´t the depth, its just the 7nth field.
But as you can see the Result does not contain the emails. If i send another request and try to get the customer directly the emails are present again.
Hello,
i have got a customer entity with a one-to-many-relation to an email-entity. Through the rest-api i am able to create the a new customer and the emails with a single request. Swagger already displays the correct arguments:
But when i go to Graphiql it tells me that it expects an array of strings as an argument for the emails:
The source of the problem is in the SchemaBuilder when the types are converted (https://github.com/api-platform/core/blob/master/src/GraphQl/Type/SchemaBuilder.php#L354). Because the input is true (createCustomerInput mutation) and the depth is 7 it always returns a GraphQl-StringType. I dont think that this is the right behaviour because the 7 isn´t the depth, its just the 7nth field.
When i do not increse the depth (https://github.com/api-platform/core/blob/master/src/GraphQl/Type/SchemaBuilder.php#L377) and just pass it to the function as it is the following mutation works and saves the customer including the emails.
Request:
Result:
But as you can see the Result does not contain the emails. If i send another request and try to get the customer directly the emails are present again.
Request:
Response
Am i missing some config or is this a bug?
The text was updated successfully, but these errors were encountered: