diff --git a/packages/backend/src/graphql/types/app.ts b/packages/backend/src/graphql/types/app.ts index f9e56a0f..74460e5d 100644 --- a/packages/backend/src/graphql/types/app.ts +++ b/packages/backend/src/graphql/types/app.ts @@ -1,5 +1,6 @@ import { GraphQLObjectType, GraphQLString, GraphQLList } from 'graphql'; import fieldType from './field'; +import authenticationStepType from './authentication-step'; const appType = new GraphQLObjectType({ name: 'App', @@ -10,7 +11,8 @@ const appType = new GraphQLObjectType({ iconUrl: { type: GraphQLString }, docUrl: { type: GraphQLString }, primaryColor: { type: GraphQLString }, - fields: { type: GraphQLList(fieldType) } + fields: { type: GraphQLList(fieldType) }, + authenticationSteps: { type: GraphQLList(authenticationStepType) } } }); diff --git a/packages/backend/src/graphql/types/authentication-step.ts b/packages/backend/src/graphql/types/authentication-step.ts new file mode 100644 index 00000000..46d24276 --- /dev/null +++ b/packages/backend/src/graphql/types/authentication-step.ts @@ -0,0 +1,34 @@ +import { GraphQLObjectType, GraphQLString, GraphQLList, GraphQLInt } from 'graphql'; + +const authenticationStepType = new GraphQLObjectType({ + name: 'authenticationStep', + fields: { + step: { type: GraphQLInt }, + type: { type: GraphQLString }, + name: { type: GraphQLString }, + fields: { + type: GraphQLList( + new GraphQLObjectType({ + name: 'authenticationStepFields', + fields: { + name: { type: GraphQLString }, + value: { type: GraphQLString }, + fields: { + type: GraphQLList( + new GraphQLObjectType({ + name: 'twitterAuthenticationStepFields', + fields: { + name: { type: GraphQLString }, + value: { type: GraphQLString } + } + }) + ) + }, + } + }), + ) + } + } +}) + +export default authenticationStepType;