chore: Expose authentication steps to the client
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { GraphQLObjectType, GraphQLString, GraphQLList } from 'graphql';
|
import { GraphQLObjectType, GraphQLString, GraphQLList } from 'graphql';
|
||||||
import fieldType from './field';
|
import fieldType from './field';
|
||||||
|
import authenticationStepType from './authentication-step';
|
||||||
|
|
||||||
const appType = new GraphQLObjectType({
|
const appType = new GraphQLObjectType({
|
||||||
name: 'App',
|
name: 'App',
|
||||||
@@ -10,7 +11,8 @@ const appType = new GraphQLObjectType({
|
|||||||
iconUrl: { type: GraphQLString },
|
iconUrl: { type: GraphQLString },
|
||||||
docUrl: { type: GraphQLString },
|
docUrl: { type: GraphQLString },
|
||||||
primaryColor: { type: GraphQLString },
|
primaryColor: { type: GraphQLString },
|
||||||
fields: { type: GraphQLList(fieldType) }
|
fields: { type: GraphQLList(fieldType) },
|
||||||
|
authenticationSteps: { type: GraphQLList(authenticationStepType) }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
34
packages/backend/src/graphql/types/authentication-step.ts
Normal file
34
packages/backend/src/graphql/types/authentication-step.ts
Normal file
@@ -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;
|
Reference in New Issue
Block a user