Skip to content

Commit 65a87c4

Browse files
authored
Merge pull request #239 from WeslleyNasRocha/feature/operation-name
Add operationName to the apollo plugin
2 parents b33a437 + 53387ce commit 65a87c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/apollo/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ const pluginApolloOps = ({ queryName, operation }: { queryName: string; operatio
1010
ts: `export function useTyped${capitalized}<Z, O extends "${queryName}">(
1111
${operation}: Z | ValueTypes[O],
1212
options?: ${capitalized}HookOptions<InputType<GraphQLTypes[O], Z>>,
13+
operationName?: string,
1314
) {
14-
return use${capitalized}<InputType<GraphQLTypes[O], Z>>(gql(Zeus("${zeusOperation}",${operation})), options);
15+
return use${capitalized}<InputType<GraphQLTypes[O], Z>>(gql(Zeus("${zeusOperation}",${operation}, operationName)), options);
1516
}`,
1617
};
1718
};

0 commit comments

Comments
 (0)