Custom Scalars Should Have Spec URL in GraphQL October 2021 Edition
Today I learned that in the latest GraphQL specification (October 2021 Edition), when defining a custom scalar type, the GraphQL service should provide a URL of a human-readable specification. It can be provided via either the new built-in @specifiedBy
directive or the specifiedByURL
introspection field. The @specifiedBy
directive takes the URL as its argument like this:
scalar DateTime @specifiedBy(url: "https://tools.ietf.org/html/rfc3339")
See Also⌗
Read other posts