Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Conversation

@ianhoffman
Copy link
Collaborator

@ianhoffman ianhoffman commented Apr 23, 2022

Allow registering custom input types. This seems really useful from a security standpoint: when coercing input to a Hack type, the GraphQL type itself can verify that the viewer has access to the resource using global context.

I haven't done any work to make defining custom types ergonomic. You have to subclass NamedType and then use TNamedInputType and TNonNullableType. We could definitely make this nicer.

I'm also not sure this works as-is with clients. For example, ChannelID is a new scalar type which takes a string and outputs a Channel object. Will clients understand that when they see ChannelID, they should provide a string?

@ianhoffman ianhoffman marked this pull request as draft April 23, 2022 00:24
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ian Hoffman seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants