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

Issue: Local dev server reads undefined when using nested arrays in query #81

Closed
Tenrys opened this issue Dec 26, 2022 · 1 comment
Closed
Assignees
Labels
is: bug Something isn't working package: server Server package
Milestone

Comments

@Tenrys
Copy link
Contributor

Tenrys commented Dec 26, 2022

With this Prisma schema:

model Customer {
  uuid      String   @id @default(uuid())
  firstName          String        @default("")
  lastName           String        @default("")
  email              String        @unique
  phoneUuid          String
  phone              Phone         @relation(fields: [phoneUuid], references: [uuid])
}

And this query:

query MyQuery {
  listCustomers(where: { 
    OR: [
      { firstName: { contains: "bla" } }, 
      { lastName: { contains: "bla" } }
    ] 
  ) {
    uuid
    firstName
    lastName
    email
    phone {
      number
    }
  }
}

GraphQL Yoga seems to be receiving the parameters incorrectly, returning an empty result since Prisma can't understand the request:

image

{
    "data": {
        "listCustomers": []
    }
}

I've tried deploying onto AppSync itself and the query does function over there, so I think it may be some slip-up related to the development server.

@maoosi maoosi added is: bug Something isn't working package: server Server package labels Dec 27, 2022
@maoosi maoosi added this to the 1.0.0-rc.5 milestone Dec 27, 2022
@maoosi maoosi self-assigned this Dec 28, 2022
@maoosi maoosi changed the title dev mode: list<Models> filtering is handling parameters incorrectly Issue: Local dev server reads undefined when using nested arrays in query Dec 28, 2022
@maoosi
Copy link
Owner

maoosi commented Dec 31, 2022

Fix will be released as part of 1.0.0-rc.5.

@maoosi maoosi closed this as completed Dec 31, 2022
Tenrys pushed a commit to Tenrys/prisma-appsync that referenced this issue Jan 2, 2023
Tenrys pushed a commit to Tenrys/prisma-appsync that referenced this issue Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug Something isn't working package: server Server package
Projects
Status: Released
Development

No branches or pull requests

2 participants