Skip to content

Commit

Permalink
Merge branch 'master' into fix-types
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jun 8, 2020
2 parents 942bc40 + a647e48 commit d75b9cd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -54,7 +54,7 @@
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.1",
"fs-extra": "9.0.1",
"graphql": "15.0.0",
"graphql": "15.1.0",
"lint-staged": "10.2.9",
"nock": "12.0.3",
"husky": "4.2.5",
Expand All @@ -79,6 +79,6 @@
"./website"
],
"resolutions": {
"graphql": "15.0.0"
"graphql": "15.1.0"
}
}
}
26 changes: 14 additions & 12 deletions packages/load/tests/loaders/schema/schema-from-json.spec.ts
Expand Up @@ -27,18 +27,20 @@ describe('Schema From Export', () => {
expect(isSchema(schema)).toBeTruthy();
const introspectionSchema = require('./test-files/githunt.json').__schema;
for (const typeName in schema.getTypeMap()) {
const type = schema.getType(typeName);
const introspectionType = introspectionSchema.types.find((t: { name: string; }) => t.name === typeName);
if (type.description || introspectionType.description) {
expect(type.description).toBe(introspectionType.description);
}
if (!typeName.startsWith('__') && (type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType)) {
const fieldMap = type.getFields();
for (const fieldName in fieldMap) {
const field = fieldMap[fieldName];
const introspectionField = introspectionType.fields.find((f: { name: string; }) => f.name === fieldName);
if (field.description || introspectionField.description) {
expect(field.description.trim()).toBe(introspectionField.description.trim());
if (!typeName.startsWith('_')) {
const type = schema.getType(typeName);
const introspectionType = introspectionSchema.types.find((t: { name: string; }) => t.name === typeName);
if (type.description || introspectionType.description) {
expect(type.description).toBe(introspectionType.description);
}
if ('getFields' in type) {
const fieldMap = type.getFields();
for (const fieldName in fieldMap) {
const field = fieldMap[fieldName];
const introspectionField = introspectionType.fields.find((f: { name: string; }) => f.name === fieldName);
if (field.description || introspectionField.description) {
expect(field.description.trim()).toBe(introspectionField.description.trim());
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/utils/tests/directives.test.ts
Expand Up @@ -250,7 +250,6 @@ describe('@directives', () => {
});

expect(schema.getType('DateFormat')).toBeDefined();
expect(schema.getDirectives()).toHaveLength(4);
expect(schema.getDirective('date')).toBeDefined();
});

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -6488,10 +6488,10 @@ graphql-upload@^8.0.2:
http-errors "^1.7.3"
object-path "^0.11.4"

graphql@15.0.0, graphql@^14.5.3:
version "15.0.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.0.0.tgz#042a5eb5e2506a2e2111ce41eb446a8e570b8be9"
integrity sha512-ZyVO1xIF9F+4cxfkdhOJINM+51B06Friuv4M66W7HzUOeFd+vNzUn4vtswYINPi6sysjf1M2Ri/rwZALqgwbaQ==
graphql@15.1.0, graphql@^14.5.3:
version "15.1.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.1.0.tgz#b93e28de805294ec08e1630d901db550cb8960a1"
integrity sha512-0TVyfOlCGhv/DBczQkJmwXOK6fjWkjzY3Pt7wY8i0gcYXq8aogG3weCsg48m72lywKSeOqedEHvVPOvZvSD51Q==

gray-matter@^4.0.2:
version "4.0.2"
Expand Down

0 comments on commit d75b9cd

Please sign in to comment.