Skip to content

Faulty cross reference detectionΒ #69

@westito

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
            }
        }
    }
}

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