Skip to content

Commit 5de0aa8

Browse files
committed
Additional assertoin and test
1 parent 240a17b commit 5de0aa8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/graphql/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class Schema {
3737
}
3838

3939
public getQuery (name: string): GraphQLType {
40-
const query = this.types.get(name);
40+
const query = this.queries.get(name);
4141

4242
if (!query) throw new Error(`Couldn't find Query of name ${name} in the GraphQL Schema.`);
4343

test/integration/VuexORMGraphQL.spec.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ describe('VuexORMGraphQL', () => {
5050

5151
const context = Context.getInstance();
5252
expect(!!context.schema).not.toEqual(false);
53-
expect(context.schema.getType('Post').name).toEqual('Post')
53+
expect(context.schema.getType('Post').name).toEqual('Post');
54+
expect(context.schema.getQuery('post').name).toEqual('post');
55+
expect(context.schema.getMutation('createPost').name).toEqual('createPost');
5456
});
5557

5658
describe('fetch', () => {

0 commit comments

Comments
 (0)