-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Labels
Description
Screenshot
Description
I've noticed that the GraphQLClientRespone
type that's returned from both GraphQLClient.rawRequest
and the high level rawRequest
function is not exported.
Was trying to utilize a custom internal type for a component to wrap these responses, but I can't reference this type as only GraphQLResponse
is exported but that seems to be only used within the ClientError
type?
I'm trying to do something like this:
export const useProcessGraphQLResultErrors = <T extends NonNullable<unknown>>(
result: GraphQLClientResponse<T> | null | undefined,
handlers: GraphQLResultHandler[],
...props: any[]
): GraphQLResultProcessed => {
// handle processing the response and reformatting/handling errors
}
Am I missing something? Is there a different place it's exposed (The entire import/export usage in JS is still a black box to me) that I need to reference?
Reproduction Steps/Repo Link
Install the graphql-request^7.2.0
package and then try to export the GraphQLClientResponse
type to reference in another file.