Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Exponential response time with nested fragments in query #416

Closed
loicmarie opened this issue Apr 26, 2020 · 1 comment
Closed

Exponential response time with nested fragments in query #416

loicmarie opened this issue Apr 26, 2020 · 1 comment

Comments

@loicmarie
Copy link

loicmarie commented Apr 26, 2020

It seems that using nested fragments in queries results in exponential response time.
With generated query/mutation and typeDefs :

type Image {
  id: ID!
  url: String
}
type User {
  id: ID!
  displayName: String!
  email: String
  photo: Image @relation(name: "HAS_PHOTO", direction: "OUT")
}

when sending multiple time a query such as:

query User {
  User {
    ...User
    __typename
  }
}

fragment User on User {
  id
  displayName
  email
  photo {
    ...Image
    __typename
  }
  __typename
}

fragment Image on Image {
  id
  url
  __typename
}

Response time will grow up until it crashes
Version : 2.13.0

@loicmarie
Copy link
Author

Sorry I just saw it was related to #415, and NPM version is not synced with master.
It is not happening anymore when using latest commit.
Waiting for NPM deployment :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant