-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Issue] Introduced support of custom scalar types for GraphQL schema #36877
Comments
✅ Jira issue https://jira.corp.adobe.com/browse/AC-7976 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Alfa. Thank you for verifying the issue. |
Hey All as per discussion with internal team confirmed the ticket |
Development team is currently working on this issue. |
Hello, As I can see this issue got fixed in the scope of the internal Jira ticket AC-7976 by the internal team Thanks |
This issue is automatically created based on existing pull request: #34651: Introduced support of custom scalar types for GraphQL schema
Support for GraphQL custom scalars
This PR adds support for custom scalar types to GraphQL.
https://graphql.org/learn/schema/#scalar-types
https://webonyx.github.io/graphql-php/type-definitions/scalars/#writing-custom-scalar-types
After PR is merged a developer will be able to define custom scalar types and implementations by using Magento schema.
For example, the following declaration enables Json scalar type
Scalar type implementation should implement new
Magento\Framework\GraphQl\Schema\Type\Scalar\CustomScalarInterface
Something like:
For example, a query that accepts JSON as input and returns JSON as output and has a resolver that returns you an argument that you just passed then you will see a picture similar to this:
This feature could be widely useful to express values that may have validation, like HTML, emails, URLs, dates, etc., and for more advanced cases like EAV attributes, where value can be expressed as a single scalar or array of scalars.
Contribution checklist (*)
The text was updated successfully, but these errors were encountered: