UNPKG

keystone-6-oauth

Version:

Keystone6 Plugin that enables social logins such as Google, Twitter, Github, Facebook and others.

22 lines (18 loc) 518 B
import { ExtendGraphqlSchema } from '@keystone-6/core/types'; import { graphql } from '@keystone-6/core'; import { getBaseAuthSchema } from './gql/getBaseAuthSchema'; export const getSchemaExtension = ({ listKey, }: { identityField: string; listKey: string; }): ExtendGraphqlSchema => graphql.extend(base => { const baseSchema = getBaseAuthSchema({ base, listKey, }); return [baseSchema.extension].filter( (x): x is Exclude<typeof x, undefined> => x !== undefined ); });