Created
February 10, 2022 22:31
-
-
Save fersilva16/208a65f6ab4d5671d08c8f523ff62258 to your computer and use it in GitHub Desktop.
Get the GraphQL fields type from a type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type GraphQLFields<T, C> = { | |
[K in keyof T]: Omit<GraphQLFieldConfig<T, C>, 'type' | 'resolve'> & { | |
type: GraphQLScalarTypeConfig<T[K], T[K]>, | |
resolve?: GraphQLFieldResolver<T, C, any, T[K]> | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment