cjoudrey/graphql-schema-linter

TypeError: Cannot convert undefined or null to object

Closed this issue ยท 9 comments

yvele commented

With the new 1.0.0 (and Node.js v12.18.3) I'm having an error:

It looks like you may have hit a bug in graphql-schema-linter.

It would be super helpful if you could report this here: https://github.com/cjoudrey/graphql-schema-linter/issues/new

TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at ignoreListErrorFilter (/Users/me/Project/node_modules/graphql-schema-linter/lib/validator.js:143:39)
    at validateSchemaDefinition (/Users/me/Project/node_modules/graphql-schema-linter/lib/validator.js:72:68)
    at run (/Users/me/Project/node_modules/graphql-schema-linter/lib/runner.js:68:58)

This is how I'm running it:

#!/usr/bin/env bash
set -e

# Enable `**` globstar
shopt -s globstar

# Also append AWS AppSync definitions
# See https://github.com/cjoudrey/graphql-schema-linter/issues/165
graphql-schema-linter \
  --comment-descriptions \
   schema/**/*.graphql graphql-schema-linter-aws.graphql

Note that this is working fine with 0.5.0

Hey @yvele, thanks for reporting this. Let me check what happen. I'm surprised the test suite didn't catch this. ๐Ÿค”

I have an idea of what is happening, but having troubles reproducing it.

@yvele do you happen to have a configuration for graphql-schema-linter in your package.json? If so, could you share it please?

Hello @cjoudrey ,
I describe the configuration in package.json and I had the same problem.

However, the error was resolved when ignore was specified, so I think the problem occurs if ignore is not specified when loading the configuration file.

The following settings will cause an error.

"graphql-schema-linter": {
  "rules": [
    "defined-types-are-used"
  ],
  "schemaPaths": [
    "./schema.graphql"
  ]
},

It works properly with the following settings.

"graphql-schema-linter": {
  "rules": [
    "defined-types-are-used"
  ],
  "ignore": {},
  "schemaPaths": [
    "./schema.graphql"
  ]
},

Hi! I'm seeing the same thing.

PR on my repo: connorshea/vglist#1487

GitLab CI logs: https://gitlab.com/connorshea/vglist/-/jobs/724634547

This is my .graphql-schema-linterrc:

{
  rules: [
    "enum-values-sorted-alphabetically",
    "defined-types-are-used",
    "deprecations-have-a-reason",
    "enum-values-have-descriptions",
    "enum-values-all-caps",
    "fields-are-camel-cased",
    "fields-have-descriptions",
    "input-object-values-are-camel-cased",
    "input-object-values-have-descriptions",
    "types-are-capitalized",
    "types-have-descriptions",
    "relay-page-info-spec",
    "relay-connection-arguments-spec",
    "relay-connection-types-spec"
  ]
}

Here's my schema.graphql if that's useful at all:

schema.graphql
"""
Options for filtering events in the activity feed.
"""
enum ActivityFeed {
  """
  Events from the current user and anyone they follow.
  """
  FOLLOWING

  """
  Events from everyone.
  """
  GLOBAL
}

"""
Autogenerated return type of AddGameToLibrary
"""
type AddGameToLibraryPayload {
  """
  The game purchase that's been added to the user's library.
  """
  gamePurchase: GamePurchase
}

"""
Video game developers and publishers
"""
type Company {
  """
  When this company was first created.
  """
  createdAt: ISO8601DateTime!

  """
  Games developed by this company.
  """
  developedGames(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  ID of the company.
  """
  id: ID!

  """
  Name of the company.
  """
  name: String!

  """
  Games published by this company.
  """
  publishedGames(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  When this company was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  Wikidata identifier
  """
  wikidataId: Int
}

"""
The connection type for Company.
"""
type CompanyConnection {
  """
  A list of edges.
  """
  edges: [CompanyEdge]

  """
  A list of nodes.
  """
  nodes: [Company]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type CompanyEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Company
}

"""
Video game engines
"""
type Engine {
  """
  When this engine was first created.
  """
  createdAt: ISO8601DateTime!

  """
  Games built with this engine.
  """
  games(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  ID of the engine.
  """
  id: ID!

  """
  Name of the engine.
  """
  name: String!

  """
  When this engine was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  Wikidata identifier
  """
  wikidataId: Int
}

"""
The connection type for Engine.
"""
type EngineConnection {
  """
  A list of edges.
  """
  edges: [EngineEdge]

  """
  A list of nodes.
  """
  nodes: [Engine]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type EngineEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Engine
}

"""
Represents events in the Activity Feed.
"""
type Event {
  """
  When this event was first created.
  """
  createdAt: ISO8601DateTime!

  """
  The type of event.
  """
  eventCategory: EventCategory!

  """
  The 'eventable' type that this event is about. This can be one of a number of different types, depending on the event.
  """
  eventable: EventableUnion!

  """
  The ID of the event, keep in mind that Events - unlike all other models - use UUIDs.
  """
  id: ID!

  """
  When this event was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  The user that this event is about.
  """
  user: User!
}

"""
Category types for events in the Activity Feed.
"""
enum EventCategory {
  """
  Event for a user adding a game to their library.
  """
  ADD_TO_LIBRARY

  """
  Event for a user updating the completion status of a game.
  """
  CHANGE_COMPLETION_STATUS

  """
  Event for a user favoriting a game.
  """
  FAVORITE_GAME

  """
  Event for a user following another user.
  """
  FOLLOWING

  """
  Event for user creation.
  """
  NEW_USER
}

"""
The connection type for Event.
"""
type EventConnection {
  """
  A list of edges.
  """
  edges: [EventEdge]

  """
  A list of nodes.
  """
  nodes: [Event]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type EventEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Event
}

"""
Objects which may be the subject of events.
"""
union EventableUnion = FavoriteGame | GamePurchase | Relationship | User

"""
This represents a game that has been favorited by a user.
"""
type FavoriteGame {
  """
  When this game was first favorited.
  """
  createdAt: ISO8601DateTime!

  """
  The game being favorited.
  """
  game: Game!

  """
  The ID of the FavoriteGame record.
  """
  id: ID!

  """
  When this favorite game was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  The user that favorited the game.
  """
  user: User!
}

"""
Autogenerated return type of FavoriteGame
"""
type FavoriteGamePayload {
  """
  The game that was added to the user's library.
  """
  game: Game
}

"""
Autogenerated return type of FollowUser
"""
type FollowUserPayload {
  """
  The user being followed.
  """
  user: User
}

"""
Video games
"""
type Game {
  """
  The average rating from all users who own the game.
  """
  avgRating: Float

  """
  URL for the game's cover image. `null` means the game has no associated cover.
  """
  coverUrl: String

  """
  When this game was first created.
  """
  createdAt: ISO8601DateTime!

  """
  Developers of the game.
  """
  developers(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): CompanyConnection

  """
  Game engines that the game runs on.
  """
  engines(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): EngineConnection

  """
  Identifier for the Epic Games Store.
  """
  epicGamesStoreId: String

  """
  Genres of the game.
  """
  genres(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GenreConnection

  """
  Identifier for Giant Bomb.
  """
  giantbombId: String

  """
  Identifier for GOG.com.
  """
  gogId: String

  """
  ID of the game.
  """
  id: ID!

  """
  Identifier for the MobyGames database.
  """
  mobygamesId: String

  """
  Name of the game.
  """
  name: String!

  """
  Users who have this game in their libraries.
  """
  owners(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): UserConnection

  """
  Identifier for PCGamingWiki.
  """
  pcgamingwikiId: String

  """
  Platforms the game is available on.
  """
  platforms(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): PlatformConnection

  """
  Publishers of the game.
  """
  publishers(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): CompanyConnection

  """
  The release date of the game.
  """
  releaseDate: ISO8601Date

  """
  The series that the game belongs to.
  """
  series: Series

  """
  Identifier for Steam games. Games can have more than one Steam App ID, but most will only have one.
  """
  steamAppIds: [Int!]

  """
  When this game was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  Identifier for Wikidata.
  """
  wikidataId: Int
}

"""
The connection type for Game.
"""
type GameConnection {
  """
  A list of edges.
  """
  edges: [GameEdge]

  """
  A list of nodes.
  """
  nodes: [Game]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type GameEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Game
}

"""
This represents a game that a user has in their library. It includes data like
the user's rating for the game, comments, hours played, etc.
"""
type GamePurchase {
  """
  Comments about the game.
  """
  comments: String

  """
  The date on which the user completed the game.
  """
  completionDate: ISO8601Date

  """
  How far the user has gotten in the game.
  """
  completionStatus: GamePurchaseCompletionStatus

  """
  When this game purchase was first created.
  """
  createdAt: ISO8601DateTime!

  """
  The game represented by the Game Purchase.
  """
  game: Game!

  """
  The number of hours the game has been played by the user, if any.
  """
  hoursPlayed: Float

  """
  ID of the game purchase.
  """
  id: ID!

  """
  Platforms that the user owns this game on.
  """
  platforms(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): PlatformConnection

  """
  Rating out of 100.
  """
  rating: Int

  """
  The number of times a game has been replayed.
  """
  replayCount: Int!

  """
  The date on which the user started the game.
  """
  startDate: ISO8601Date

  """
  Stores that the user owns this game on.
  """
  stores(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): StoreConnection

  """
  When this game purchase was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  The owner of the Game Purchase.
  """
  user: User!
}

"""
Completion Status options for game purchases (games in a user's library).
"""
enum GamePurchaseCompletionStatus {
  """
  The game has been completed.
  """
  COMPLETED

  """
  The game was dropped without being completed.
  """
  DROPPED

  """
  The game is 100% complete, e.g. with all achievements unlocked.
  """
  FULLY_COMPLETED

  """
  The game is currently being played.
  """
  IN_PROGRESS

  """
  The game cannot be completed.
  """
  NOT_APPLICABLE

  """
  The game is incomplete and not being played, but the user intends to come back to play it again later.
  """
  PAUSED

  """
  The game is unplayed.
  """
  UNPLAYED
}

"""
The connection type for GamePurchase.
"""
type GamePurchaseConnection {
  """
  A list of edges.
  """
  edges: [GamePurchaseEdge]

  """
  A list of nodes.
  """
  nodes: [GamePurchase]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type GamePurchaseEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: GamePurchase
}

"""
Video game genres
"""
type Genre {
  """
  When this genre was first created.
  """
  createdAt: ISO8601DateTime!

  """
  Games in this genre.
  """
  games(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  ID of the genre.
  """
  id: ID!

  """
  Name of the genre.
  """
  name: String!

  """
  When this genre was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  Identifier for Wikidata.
  """
  wikidataId: Int
}

"""
The connection type for Genre.
"""
type GenreConnection {
  """
  A list of edges.
  """
  edges: [GenreEdge]

  """
  A list of nodes.
  """
  nodes: [Genre]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type GenreEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Genre
}

"""
An ISO 8601-encoded date
"""
scalar ISO8601Date

"""
An ISO 8601-encoded datetime
"""
scalar ISO8601DateTime

"""
Mutations are GraphQL requests that can be used to create, update, or delete records on vglist.
"""
type Mutation {
  """
  Add a game to the current user's library.
  """
  addGameToLibrary(
    """
    Comments about the game.
    """
    comments: String

    """
    The date on which the user completed the game.
    """
    completionDate: ISO8601Date

    """
    How far the user has gotten in the game.
    """
    completionStatus: GamePurchaseCompletionStatus

    """
    ID of game to add.
    """
    gameId: ID!

    """
    The number of hours a game has been played.
    """
    hoursPlayed: Float

    """
    The IDs of platforms that the game is owned on.
    """
    platforms: [ID]

    """
    The game rating (out of 100).
    """
    rating: Int

    """
    The number of times a game has been replayed.
    """
    replayCount: Int

    """
    The date on which the user started the game.
    """
    startDate: ISO8601Date

    """
    The IDs of stores that the game is owned on.
    """
    stores: [ID]
  ): AddGameToLibraryPayload

  """
  Add a game to the current user's favorites.
  """
  favoriteGame(
    """
    ID of game to favorite.
    """
    gameId: ID!
  ): FavoriteGamePayload

  """
  Follow a user.
  """
  followUser(
    """
    ID of user to follow.
    """
    userId: ID!
  ): FollowUserPayload

  """
  Remove a game from the current user's library.
  """
  removeGameFromLibrary(
    """
    ID of game to remove from user library.
    """
    gameId: ID

    """
    ID of game purchase to delete.
    """
    gamePurchaseId: ID
  ): RemoveGameFromLibraryPayload

  """
  Remove a game from the current user's favorites.
  """
  unfavoriteGame(
    """
    ID of game to unfavorite.
    """
    gameId: ID!
  ): UnfavoriteGamePayload

  """
  Unfollow a user.
  """
  unfollowUser(
    """
    ID of user to unfollow.
    """
    userId: ID!
  ): UnfollowUserPayload

  """
  Update a game in the current user's library.
  """
  updateGameInLibrary(
    """
    Comments about the game.
    """
    comments: String

    """
    The date on which the user completed the game.
    """
    completionDate: ISO8601Date

    """
    How far the user has gotten in the game.
    """
    completionStatus: GamePurchaseCompletionStatus

    """
    ID of game purchase to modify.
    """
    gamePurchaseId: ID!

    """
    The number of hours a game has been played.
    """
    hoursPlayed: Float

    """
    The IDs of platforms that the game is owned on.
    """
    platforms: [ID]

    """
    The game rating (out of 100).
    """
    rating: Int

    """
    The number of times a game has been replayed.
    """
    replayCount: Int

    """
    The date on which the user started the game.
    """
    startDate: ISO8601Date

    """
    The IDs of stores that the game is owned on.
    """
    stores: [ID]
  ): UpdateGameInLibraryPayload
}

"""
Information about pagination in a connection.
"""
type PageInfo {
  """
  When paginating forwards, the cursor to continue.
  """
  endCursor: String

  """
  When paginating forwards, are there more items?
  """
  hasNextPage: Boolean!

  """
  When paginating backwards, are there more items?
  """
  hasPreviousPage: Boolean!

  """
  The max page size for a given set of nodes.
  """
  pageSize: Int!

  """
  When paginating backwards, the cursor to continue.
  """
  startCursor: String
}

"""
Video game platforms, usually consoles or PC operating systems.
"""
type Platform {
  """
  When this platform was first created.
  """
  createdAt: ISO8601DateTime!

  """
  Games available on this platform.
  """
  games(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  ID of the platform.
  """
  id: ID!

  """
  Name of the platform.
  """
  name: String!

  """
  When this platform was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  Identifier for Wikidata.
  """
  wikidataId: Int
}

"""
The connection type for Platform.
"""
type PlatformConnection {
  """
  A list of edges.
  """
  edges: [PlatformEdge]

  """
  A list of nodes.
  """
  nodes: [Platform]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type PlatformEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Platform
}

"""
Queries are GraphQL requests that can be used to request data from vglist's database.
"""
type Query {
  """
  View recent activity.
  """
  activity(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String
    feedType: ActivityFeed

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): EventConnection

  """
  List all companies.
  """
  companies(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): CompanyConnection

  """
  Find a company by ID.
  """
  company(id: ID!): Company

  """
  Find a company by searching based on its name.
  """
  companySearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Name to search by.
    """
    query: String!
  ): CompanyConnection

  """
  Find a game engine by ID.
  """
  engine(id: ID!): Engine

  """
  Find a game engine by searching based on its name.
  """
  engineSearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Name to search by.
    """
    query: String!
  ): EngineConnection

  """
  List all game engines.
  """
  engines(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): EngineConnection

  """
  Find a game by ID.
  """
  game(
    """
    Find a game by its GiantBomb ID, e.g. `'3030-23708'`.
    """
    giantbombId: String

    """
    Find a game by its unique ID.
    """
    id: ID
  ): Game

  """
  Find a game purchase by ID.
  """
  gamePurchase(id: ID!): GamePurchase

  """
  Find a game by searching based on its name.
  """
  gameSearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Name to search by.
    """
    query: String!
  ): GameConnection

  """
  List all games.
  """
  games(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  Find a genre by ID.
  """
  genre(id: ID!): Genre

  """
  Find a genre by searching based on its name.
  """
  genreSearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Name to search by.
    """
    query: String!
  ): GenreConnection

  """
  List all genres.
  """
  genres(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GenreConnection

  """
  Find a platform by ID.
  """
  platform(id: ID!): Platform

  """
  Find a platform by searching based on its name.
  """
  platformSearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Name to search by.
    """
    query: String!
  ): PlatformConnection

  """
  List all platforms.
  """
  platforms(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): PlatformConnection

  """
  Find a series by ID.
  """
  series(id: ID!): Series

  """
  List all series'. This is different from the other list queries because series is the plural of series. :(
  """
  seriesList(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): SeriesConnection

  """
  Find a series by searching based on its name.
  """
  seriesSearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Name to search by.
    """
    query: String!
  ): SeriesConnection

  """
  Find a store by ID.
  """
  store(id: ID!): Store

  """
  Find a store by searching based on its name.
  """
  storeSearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Name to search by.
    """
    query: String!
  ): StoreConnection

  """
  List all stores.
  """
  stores(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): StoreConnection

  """
  Find a user.
  """
  user(
    """
    Find a user by their ID.
    """
    id: ID

    """
    Find a user by their username.
    """
    username: String
  ): User

  """
  Find a user by searching based on its username.
  """
  userSearch(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int

    """
    Username to search by.
    """
    query: String!
  ): UserConnection

  """
  List all users.
  """
  users(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): UserConnection
}

"""
This represents the relationship between two users, where one user is following another.
"""
type Relationship {
  """
  When this relationship was first created.
  """
  createdAt: ISO8601DateTime!

  """
  The user being followed.
  """
  followed: User!

  """
  The user that's following the other.
  """
  follower: User!

  """
  ID of the relationship.
  """
  id: ID!

  """
  When this relationship was last updated.
  """
  updatedAt: ISO8601DateTime!
}

"""
Autogenerated return type of RemoveGameFromLibrary
"""
type RemoveGameFromLibraryPayload {
  """
  The game being removed from the user's library.
  """
  game: Game
}

"""
Video game series'
"""
type Series {
  """
  When this series was first created.
  """
  createdAt: ISO8601DateTime!

  """
  Games in this series.
  """
  games(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  ID of the series.
  """
  id: ID!

  """
  Name of the series.
  """
  name: String!

  """
  When this series was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  Identifier for Wikidata.
  """
  wikidataId: Int
}

"""
The connection type for Series.
"""
type SeriesConnection {
  """
  A list of edges.
  """
  edges: [SeriesEdge]

  """
  A list of nodes.
  """
  nodes: [Series]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type SeriesEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Series
}

"""
Stores where video games are sold, e.g. Steam or the Epic Games Store
"""
type Store {
  """
  When this store was first created.
  """
  createdAt: ISO8601DateTime!

  """
  ID of the store.
  """
  id: ID!

  """
  Name of the store.
  """
  name: String!

  """
  When this store was last updated.
  """
  updatedAt: ISO8601DateTime!
}

"""
The connection type for Store.
"""
type StoreConnection {
  """
  A list of edges.
  """
  edges: [StoreEdge]

  """
  A list of nodes.
  """
  nodes: [Store]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type StoreEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: Store
}

"""
Autogenerated return type of UnfavoriteGame
"""
type UnfavoriteGamePayload {
  """
  The game being unfavorited.
  """
  game: Game
}

"""
Autogenerated return type of UnfollowUser
"""
type UnfollowUserPayload {
  """
  The user being unfollowed.
  """
  user: User
}

"""
Autogenerated return type of UpdateGameInLibrary
"""
type UpdateGameInLibraryPayload {
  """
  The game purchase being updated in the user's library.
  """
  gamePurchase: GamePurchase
}

"""
User accounts on vglist
"""
type User {
  """
  Activity Events that refer to this user.
  """
  activity(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): EventConnection

  """
  URL for the user's avatar image. `null` means the user has the default avatar.
  """
  avatarUrl: String

  """
  Whether this user has been banned.
  """
  banned: Boolean!

  """
  User profile description, aka 'bio'.
  """
  bio: String

  """
  When this user was first created.
  """
  createdAt: ISO8601DateTime!

  """
  Games that this user has favorited.
  """
  favoriteGames(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GameConnection

  """
  Users that are following this user.
  """
  followers(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): UserConnection

  """
  Users that this user is following.
  """
  following(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): UserConnection

  """
  Games in this user's library.
  """
  gamePurchases(
    """
    Returns the elements in the list that come after the specified cursor.
    """
    after: String

    """
    Returns the elements in the list that come before the specified cursor.
    """
    before: String

    """
    Returns the first _n_ elements from the list.
    """
    first: Int

    """
    Returns the last _n_ elements from the list.
    """
    last: Int
  ): GamePurchaseConnection

  """
  ID of the user.
  """
  id: ID!

  """
  The user's level of privacy.
  """
  privacy: UserPrivacy!

  """
  User permission level.
  """
  role: UserRole!

  """
  The user's slug, used for their profile URL.
  """
  slug: String!

  """
  When this user was last updated.
  """
  updatedAt: ISO8601DateTime!

  """
  Username of the user.
  """
  username: String!
}

"""
The connection type for User.
"""
type UserConnection {
  """
  A list of edges.
  """
  edges: [UserEdge]

  """
  A list of nodes.
  """
  nodes: [User]

  """
  Information to aid in pagination.
  """
  pageInfo: PageInfo!
}

"""
An edge in a connection.
"""
type UserEdge {
  """
  A cursor for use in pagination.
  """
  cursor: String!

  """
  The item at the end of the edge.
  """
  node: User
}

"""
An enum describing the privacy level of a given user. Most users will be `PUBLIC_ACCOUNT`.
"""
enum UserPrivacy {
  """
  User has a private profile.
  """
  PRIVATE_ACCOUNT

  """
  User has a publicly-visible profile.
  """
  PUBLIC_ACCOUNT
}

"""
Roles that a user can have, these define permissions levels. Most users will be `MEMBER`.
"""
enum UserRole {
  """
  User is an admin and has the highest permissions.
  """
  ADMIN

  """
  User is a regular user.
  """
  MEMBER

  """
  User has some heightened permissions.
  """
  MODERATOR
}

Weirdly, when I run it locally on my Mac it seems to work fine. ๐Ÿค”

EDIT: Okay, I force-deleted graphql-schema-linter in my node modules directory and reinstalled it and it breaks now. So I can reproduce it locally.

It's fixed for me if I add "ignore": {} to my linter config, so if I had to guess I think it's this line that's doing it: 5dc0631#diff-91ba5f4df12e1b6b0629662164b3f14eR32

Just need to add a default value of {} for ignore

Should probably run the tests using a config file that doesn't have the ignore field as well :)

Also, FWIW there are a few comments in the repo about how options are deprecated and should be removed in 1.0.0, but it doesn't look like they were :P

yvele commented

@yvele do you happen to have a configuration for graphql-schema-linter in your package.json? If so, could you share it please?

I don't have configuration in package.json ๐Ÿคท

I only have a graphql-schema-linter.config.js

module.exports = {
  rules : [
    "defined-types-are-used",
    "deprecations-have-a-reason",
    "enum-values-all-caps",
    "enum-values-sorted-alphabetically",
    "fields-are-camel-cased",
    "fields-have-descriptions",
    "input-object-values-are-camel-cased",
    "input-object-values-have-descriptions",
    "relay-connection-types-spec",
    "relay-connection-arguments-spec",
    "relay-page-info-spec",
    "types-are-capitalized",
    "types-have-descriptions"
  ]
};

@cjoudrey I have opened a PR for this #253. This issue is happening only when we are reading the values from config files. Since there is no default value for the ignore in the config file so its undefined and eventually breaks in ignoreListErrorFilter function in validator.js file where it expects it to be an object.

Thanks all for your patience. This should now be fixed in v1.0.1.

Also thanks to @paramjitkaur for opening a pull request with a fix. I appreciate the help! ๐Ÿ˜„