Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL: Error when iterating over undefined array #5923

Closed
douglasmuraoka opened this issue Aug 15, 2019 · 0 comments
Closed

GraphQL: Error when iterating over undefined array #5923

douglasmuraoka opened this issue Aug 15, 2019 · 0 comments

Comments

@douglasmuraoka
Copy link
Contributor

Issue Description

TypeError: Cannot read property 'map' of undefined when iterating over an undefined array

Steps to reproduce

  1. Create a custom class (named as "tests")
  2. Create an Array field (named as "arr")
  3. Leave this field value undefined (not null, not [])
  4. Execute the following GraphQL query:
query {
  objects {
    tests {
      arr {
        ...on Element {
          value
        }
      }
    }
  }
}

Expected Results

GraphQL query should execute.

Actual Outcome

TypeError: Cannot read property 'map' of undefined
parseClassTypes:652

Environment Setup

  • Server
    • parse-server version: 3.7.2
    • Localhost or remote server? localhost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants