Skip to content

Commit

Permalink
fix(query): prefer Result over Data for result data type suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
CPatchane committed Mar 9, 2022
1 parent 6ebad15 commit 4cffd77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/generators/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ const generateQueryImplementation = ({
: `typeof ${operationName}`;

return `
export type ${pascal(name)}QueryData = NonNullable<AsyncReturnType<${dataType}>>
export type ${pascal(name)}QueryResult = NonNullable<AsyncReturnType<${dataType}>>
export type ${pascal(name)}QueryError = ${errorType}
export const ${camel(
Expand Down Expand Up @@ -559,7 +559,7 @@ const generateQueryHook = (
return `
export type ${pascal(
operationName,
)}MutationData = NonNullable<AsyncReturnType<${dataType}>>
)}MutationResult = NonNullable<AsyncReturnType<${dataType}>>
export type ${pascal(operationName)}MutationError = ${errorType}
export const ${camel(`use-${operationName}`)} = <TError = ${errorType},
Expand Down

0 comments on commit 4cffd77

Please sign in to comment.