I think it's fair to start with permitting response access in the low level escape hatch mode of graphql and graphqlSuccess. We can make the presence of response type safe based on client config (the transport).
We would be extending the native GraphQLExectionResult type so wherever that type is expected in the ecosystem the results of a raw Graffle request would still conform to the interface, the extra response field just being ignored.
I don't think the extensions field is the right place for this but I should double check actually, because I'm realizing now I'm not sure what the extensions field was really for.
Perceived Problem
Ideas / Proposed Solution(s)
This is the current Graffle return mode system:
graphql
GraphQLExecutionResult
graphqlSuccess
GraphQLExecutionResult
with.errors
always missing.data
(default)GraphQLExecutionResult.data
dataSuccess
GraphQLExecutionResult.data
without any schema errorsdataAndErrors
GraphQLExecutionResult.data
, errors from: Extensions, Fetch, GraphQLExecutionResult.errorsI think it's fair to start with permitting response access in the low level escape hatch mode of
graphql
andgraphqlSuccess
. We can make the presence of response type safe based on client config (the transport).We would be extending the native
GraphQLExectionResult
type so wherever that type is expected in the ecosystem the results of a rawGraffle
request would still conform to the interface, the extraresponse
field just being ignored.I don't think the
extensions
field is the right place for this but I should double check actually, because I'm realizing now I'm not sure what the extensions field was really for.