Infinite recursiveness
zvictor opened this issue · 1 comments
zvictor commented
Gql-generator goes into infinite recursiveness once we add just 2 lines of code to the end of example/sampleTypeDef.graphql
!
CC @RvanderLaan
Steps to reproduce:
- Copy the code below to
example/sampleTypeDef.graphql
:
type Query {
user(id: Int!): User!
members: [Member!] @deprecated(reason: "Test a deprecated query")
}
type Mutation {
signup(
email: String!
username: String!
password: String!
): UserToken!
signin(
email: String!
password: String!
): String!
setConfig(
prefs: PrefsInput
): Config!
sendMessage(
message: String!
): String! @deprecated(reason: "Test a deprecated mutation")
}
input PrefsInput {
language: String!
}
type Config {
language: String!
level(domain: String!): Int!
lastSeen(domain: String!): Int!
theme(domain: String!): Int!
}
type Subscription {
UserUpdated(UserId: Int!): User
}
type UserToken {
token: String!
user: User!
}
type User {
id: Int!
username: String!
email: String!
createdAt: String!
context: Context!
details: UserDetails!
address: String! @deprecated(reason: "Test a deprecated field")
}
union UserDetails = Guest | Member | Premium
type Guest {
region(language: String): String!
}
type Member {
address: String!
}
type Premium {
location: String!
card: Card!
}
type Card {
number: String!
type: [CardType!]!
owner: User! # <------------------ ADDED ---------------------
}
type CardType {
key: String!
}
type Context {
user: User! # Circular ref
domain: String!
card: Card! # <------------------ ADDED ---------------------
}
- Run the tests or just
node index.js --schemaFilePath ./example/sampleTypeDef.graphql --destDirPath ./example/output