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

Better Flow type defs for field resolvers #574

Closed
1 of 5 tasks
leebyron opened this issue Nov 15, 2016 · 8 comments
Closed
1 of 5 tasks

Better Flow type defs for field resolvers #574

leebyron opened this issue Nov 15, 2016 · 8 comments

Comments

@leebyron
Copy link
Contributor

leebyron commented Nov 15, 2016

When writing resolvers for GraphQL types in a flow-typed environment, the Flow types should aid as much as possible.

  • Do not require casting through (: any) for typical behavior.
  • Proper typing of context
  • Proper typing of source
  • Proper typing of return
  • Proper typing of arguments
@leebyron
Copy link
Contributor Author

This was originally inspired by discussion in #554.

leebyron added a commit that referenced this issue Nov 15, 2016
leebyron added a commit that referenced this issue Nov 15, 2016
This incrementally adds to #574, however a broader solution is needed to create a mirroring between graphql type definitions and internal flow types.
leebyron added a commit that referenced this issue Nov 15, 2016
This changes the flow types from an object of mixed values to an object of any values. This is explicitly less type safe, however is way more ergonomic and better matches the previous behavior before flow types were exported.

This was suggested in #554 and partially implements #574
@leebyron leebyron self-assigned this Nov 16, 2016
@jamiehodge
Copy link

@leebyron is there any progress on this meta issue? It would really helpful to get end-to-end typing of the graph and the possibility of leveraging that in the client.

@jamiehodge
Copy link

@leebyron are you still working on this issue? Is there something I or others could help with?

@corydeppen
Copy link

Has there been any additional consideration for what it will take to move forward with the remainder of the typings for resolvers?

leebyron added a commit that referenced this issue Dec 6, 2017
This incrementally adds to #574, however a broader solution is needed to create a mirroring between graphql type definitions and internal flow types.
leebyron added a commit that referenced this issue Dec 6, 2017
This incrementally adds to #574, however a broader solution is needed to create a mirroring between graphql type definitions and internal flow types.
@sibelius
Copy link

@gtkatakura is using conditional mapped types to improve types: gtkatakura/fullstack-challenge@36cc105

@gtkatakura-bysoft
Copy link

gtkatakura-bysoft commented Jul 25, 2018

If it helps... proper typing of return (only for GraphQLScalarType) in TypeScript

gtkatakura/fullstack-challenge@bc01861

@sibelius
Copy link

typing for GraphQLScalarType #1522

@saihaj
Copy link
Member

saihaj commented Jun 27, 2022

we no longer support Flow #2860

@saihaj saihaj closed this as completed Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants