We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExtractPersistedOperationId
Maybe the following function:
export declare type ExtractPersistedOperationId = (params: GraphQLParams) => null | string;
graphql-yoga/packages/plugins/persisted-operations/src/index.ts
Lines 8 to 10 in 50f7cd7
Should rather be typed:
export type ExtractPersistedOperationId = ( params: Record<string, unknown> ) => null | string
This would force people to do proper type narrowing:
const yoga = createYoga({ plugins: [ usePersistedOperations({ extractPersistedOperationId(payload) { if (typeof payload.doc_id === 'string') { return payload.doc_id } return null } getPersistedOperation(key: string) { return persistedOperations[key] }, }), ], })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Maybe the following function:
graphql-yoga/packages/plugins/persisted-operations/src/index.ts
Lines 8 to 10 in 50f7cd7
Should rather be typed:
This would force people to do proper type narrowing:
The text was updated successfully, but these errors were encountered: