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

Headless CMS - Merge "float" and "integer" fields into a single "number" field #814

Closed
adrians5j opened this issue May 2, 2020 · 2 comments
Assignees
Labels

Comments

@adrians5j
Copy link
Member

adrians5j commented May 2, 2020

No need to have two separate fields. For now, let's just go with a single "number" field and later down the road we can adjust this if needed.

BONUS:
I totally forgot that we have the graphql-scalar plugin. So while you're at it, please document it as well.

Just create a new entry here: https://docs.webiny.com/docs/api-development/plugins-reference

@adrians5j
Copy link
Member Author

adrians5j commented May 5, 2020

@Pavel910 For this one, we're gonna need a separate Number type for the GraphQL schema I'd say. It's either that or the user will have to select the number type in field options.

What do you think?

Some good info here - https://www.apollographql.com/docs/apollo-server/schema/scalars-enums/

Also, check this to see how you can add new scalars (@Ashu96): packages/graphql/src/createSchema/prepareSchema.ts:29

@Pavel910
Copy link
Collaborator

Pavel910 commented May 5, 2020

@doitadrian I think a custom scalar type for GQL is actually a good idea 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants