Skip to content

graphql.js custom scalar type docs are very vague #163

Open
@msakrejda

Description

@msakrejda

I was trying to create a custom scalar type by reading the docs, but what's there is very vague and confusing:

  • What are the semantics of the three required functions? Only names are listed right now.
  • The example doesn't compensate for the lack of descriptions, since it uses the same function for two of the fields
  • The example type is strange: it... returns the value if odd and null otherwise? That seems like a completely fanciful type with no practical use. Perhaps a Date type would be more useful?

I think the GraphQL docs are fantastic overall, but this section was not clear at all.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions