feat: Implement getApp graphQL query
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { GraphQLObjectType, GraphQLSchema, GraphQLString, GraphQLList } from 'graphql';
|
||||
import { GraphQLObjectType, GraphQLSchema, GraphQLString, GraphQLList, GraphQLNonNull } from 'graphql';
|
||||
import getApps from './queries/get-apps';
|
||||
import getApp from './queries/get-app';
|
||||
import appType from './types/app';
|
||||
|
||||
const queryType = new GraphQLObjectType({
|
||||
name: 'Query',
|
||||
@@ -10,7 +12,14 @@ const queryType = new GraphQLObjectType({
|
||||
name: { type: GraphQLString }
|
||||
},
|
||||
resolve: (_, { name }) => getApps(name)
|
||||
}
|
||||
},
|
||||
getApp: {
|
||||
type: appType,
|
||||
args: {
|
||||
name: { type: GraphQLNonNull(GraphQLString) },
|
||||
},
|
||||
resolve: (_, { name }) => getApp(name)
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user