Skip to content

Commit

Permalink
fix: fixed ability,item by fuzzy
Browse files Browse the repository at this point in the history
Also forgot to include ItemResolver in my schema builder, woops for that
  • Loading branch information
favna committed Nov 6, 2019
1 parent f920694 commit 0d134ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/graphql/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { ApolloServer } from 'apollo-server-express';
import { buildSchemaSync } from 'type-graphql';
import DexResolver from '../resolvers/DexResolver';
import AbilityResolver from '../resolvers/AbilityResolver';
import ItemResolver from '../resolvers/ItemResolver';

const gqlServer = () => {
const app = express();
const schema = buildSchemaSync({ resolvers: [ DexResolver, AbilityResolver ] });
const schema = buildSchemaSync({ resolvers: [ DexResolver, AbilityResolver, ItemResolver ] });

const apolloServer = new ApolloServer({
schema,
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/AbilityResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class AbilityResolver {
return entry;
}

@Query(() => GraphQLJSONObject, {
@Query(() => [ GraphQLJSONObject ], {
description: [
'Gets entries of multiple ability based on a fuzzy search.',
'You can supply skip and take to limit the amount of flavour texts to return and reverse to show latest games on top.',
Expand Down
2 changes: 1 addition & 1 deletion src/resolvers/ItemResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class ItemResolver {
return entry;
}

@Query(() => GraphQLJSONObject, {
@Query(() => [ GraphQLJSONObject ], {
description: [
'Gets entries of multiple items based on a fuzzy search.',
'You can supply skip and take to limit the amount of flavour texts to return and reverse to show latest games on top.',
Expand Down

0 comments on commit 0d134ea

Please sign in to comment.