Skip to content

Commit

Permalink
Conform LimitedLengthType name to older graphql-js requirements.
Browse files Browse the repository at this point in the history
This will fix tests in GraphQL.js v0.11.
  • Loading branch information
benjamn committed Mar 14, 2018
1 parent 094b0e9 commit 043ee0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/schema-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ input BookInput {
class LimitedLengthType extends GraphQLScalarType {
constructor(type, maxLength) {
super({
name: `Length <= ${maxLength}`,
name: `LengthAtMost${maxLength}`,
serialize(value) {
assert.strictEqual(typeof value, 'string');
assert.isAtMost(value.length, maxLength);
Expand Down
2 changes: 1 addition & 1 deletion src/test/testDirectives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ describe('@directives', () => {
class LimitedLengthType extends GraphQLScalarType {
constructor(type: GraphQLType, maxLength: number) {
super({
name: `Length <= ${maxLength}`,
name: `LengthAtMost${maxLength}`,
serialize(value: string) {
assert.strictEqual(typeof value, 'string');
assert.isAtMost(value.length, maxLength);
Expand Down

0 comments on commit 043ee0d

Please sign in to comment.