Skip to content

Commit

Permalink
update type assertion to any.
Browse files Browse the repository at this point in the history
the reason of this change is to escape the error of type error. refer to https://github.com/dotansimha/graphql-code-generator/actions/runs/6523101984/job/17713396917?pr=9708
  • Loading branch information
tnyo43 committed Oct 15, 2023
1 parent ddb461c commit fcd0129
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion dev-test/gql-tag-operations-urql/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion dev-test/gql-tag-operations/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion dev-test/gql-tag-operations/graphql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: TypedDocumentString<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/persisted-documents/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/apollo-client/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/http-executor/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/nextjs-swr/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: TypedDocumentString<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/urql/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: TypedDocumentString<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript-esm/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: TypedDocumentString<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite/vite-react-cts/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite/vite-react-mts/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/vite/vite-react-ts/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/apollo-composable/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/urql/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/villus/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion examples/yoga-tests/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function makeFragmentData<F extends DocumentTypeDecoration<any, any>>(
data: UnmaskFragment<FragmentType<F>>,
_fragment: F
): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down
2 changes: 1 addition & 1 deletion packages/presets/client/src/fragment-masking-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export type UnmaskFragment<F> = UnionFieldToIntersection<Flatten<F>>;
export function makeFragmentData<
F extends DocumentTypeDecoration<any, any>,
>(data: UnmaskFragment<FragmentType<F>>, _fragment: F): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}`;

const defaultUnmaskFunctionName = 'useFragment';
Expand Down
2 changes: 1 addition & 1 deletion packages/presets/client/tests/client-preset.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ export * from "./gql";`);
export function makeFragmentData<
F extends DocumentTypeDecoration<any, any>,
>(data: UnmaskFragment<FragmentType<F>>, _fragment: F): FragmentType<F> {
return data as FragmentType<F>;
return data as any;
}
export function isFragmentReady<TQuery, TFrag>(
queryNode: DocumentTypeDecoration<TQuery, any>,
Expand Down

0 comments on commit fcd0129

Please sign in to comment.