Skip to content

Faulty cross reference detection #69

Description

@westito

Generator skips repeating models however those aren't cross references. With "--includeCrossReferences" parameter there is no issue.

Schema:

type OrderDTO {
  payment: PaymentDTO!
  tipPayment: PaymentDTO!
}

type PaymentDTO {
  id: Float!
  user: User!
}

type User {
  id: Int!
  fcmTokens: [FCMToken!]
  invoiceAddress: UserInvoiceAddressInput
}

type FCMToken {
  token: String!
  lastSeen: String!
}

type UserInvoiceAddressInput {
  customerName: String!
  country: String!
  city: String!
  streetAddress: String!
  postalCode: String!
  taxNumber: String
  email: String
}

type Query {
  getOrder(orderId: Int!): OrderDTO!
}

Generation result:

query getOrder($orderId: Int!){
    getOrder(orderId: $orderId){
        payment{
            id
            user{
                id
                fcmTokens{
                    token
                    lastSeen
                }
                invoiceAddress{
                    customerName
                    country
                    city
                    streetAddress
                    postalCode
                    taxNumber
                    email
                }
            }
        }
        tipPayment{
            id
            user{
                id
            }
        }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions