Skip to content

Commit

Permalink
fix: update graphql till v15.0.0 and other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed Apr 5, 2020
1 parent 07226af commit 02eb9c8
Show file tree
Hide file tree
Showing 5 changed files with 621 additions and 591 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
"devDependencies": {
"@types/dedent": "0.7.0",
"@types/glob": "7.1.1",
"@types/jest": "25.1.2",
"@types/node": "13.7.1",
"@typescript-eslint/eslint-plugin": "2.19.2",
"@typescript-eslint/parser": "2.19.2",
"apollo-server": "2.10.1",
"@types/jest": "25.2.1",
"@types/node": "13.11.0",
"@typescript-eslint/eslint-plugin": "2.26.0",
"@typescript-eslint/parser": "2.26.0",
"apollo-server": "2.11.0",
"eslint": "6.8.0",
"eslint-config-prettier": "6.10.0",
"eslint-config-prettier": "6.10.1",
"eslint-plugin-prettier": "3.1.2",
"graphql": "14.6.0",
"graphql-compose": "7.12.0",
"jest": "25.1.0",
"prettier": "1.19.1",
"graphql": "15.0.0",
"graphql-compose": "7.14.1",
"jest": "25.2.7",
"prettier": "2.0.2",
"rimraf": "3.0.2",
"semantic-release": "17.0.3",
"ts-jest": "25.2.0",
"ts-node": "8.6.2",
"typescript": "3.7.5"
"semantic-release": "17.0.4",
"ts-jest": "25.3.1",
"ts-node": "8.8.2",
"typescript": "3.8.3"
},
"scripts": {
"watch": "jest --watch",
Expand Down
80 changes: 43 additions & 37 deletions src/__tests__/__snapshots__/astToSchema-test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,34 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`astToSchema() Schema ./__testSchema__ schema 1`] = `
"type Mutation {
logs: MutationLogs
auth: MutationAuth
user: MutationUser
}
type MutationAuth {
# Login operation
login(email: String, password: String): Boolean
logout: Boolean
nested: MutationAuthNested
}
type MutationAuthNested {
method: Boolean
}
type MutationLogs {
nested: MutationLogsNested
}
type MutationLogsNested {
list: Boolean
}
type MutationUser {
create: Boolean
update: Boolean
"\\"\\"\\"\\"\\"\\"
schema {
query: Query
mutation: Mutation
}
type Query {
Expand All @@ -39,15 +15,6 @@ type Query {
auth: QueryAuth
}
type QueryAuth {
isLoggedIn: Boolean
nested: QueryAuthNested
}
type QueryAuthNested {
method: Boolean
}
type QueryMe {
address: QueryMeAddress
name: String
Expand Down Expand Up @@ -77,5 +44,44 @@ type UserAwesomeType {
type UserExtendedData {
starsCount: Int
}
type QueryAuth {
isLoggedIn: Boolean
nested: QueryAuthNested
}
type QueryAuthNested {
method: Boolean
}
type Mutation {
logs: MutationLogs
auth: MutationAuth
user: MutationUser
}
type MutationLogs {
nested: MutationLogsNested
}
type MutationLogsNested {
list: Boolean
}
type MutationAuth {
# Login operation
login(email: String, password: String): Boolean
logout: Boolean
nested: MutationAuthNested
}
type MutationAuthNested {
method: Boolean
}
type MutationUser {
create: Boolean
update: Boolean
}
"
`;
18 changes: 7 additions & 11 deletions src/__tests__/astToSchema-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,13 @@ describe('astToSchema()', () => {
// check that fields from sibling files was added
expect(sc.Query.getFieldOTC('me').getFieldTypeName('name')).toBe('String');
expect((sc.Query.getFieldOTC('me').getFieldConfig('name') as any).resolve()).toBe('nodkz');
expect(
sc.Query.getFieldOTC('me')
.getFieldOTC('address')
.getTypeName()
).toBe('QueryMeAddress');
expect(
sc.Query.getFieldOTC('me')
.getFieldOTC('address')
.getFieldNames()
.sort()
).toEqual(['city', 'street']);
expect(sc.Query.getFieldOTC('me').getFieldOTC('address').getTypeName()).toBe(
'QueryMeAddress'
);
expect(sc.Query.getFieldOTC('me').getFieldOTC('address').getFieldNames().sort()).toEqual([
'city',
'street',
]);
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/testHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function _getArgsForQuery(
};
}

export async function testOperation(opts: RunQueryOpts): Promise<ExecutionResult<any>> {
export async function testOperation(opts: RunQueryOpts): Promise<ExecutionResult> {
const schema = testBuildSchema(opts.fc, opts.schemaComposer);

const res = await graphql({
Expand Down
Loading

0 comments on commit 02eb9c8

Please sign in to comment.