Skip to content

Bug fixes related to using --generateInterfaces config option for data classes.#161

Merged
srinivasankavitha merged 1 commit intomasterfrom
generate-interfaces
Jun 4, 2021
Merged

Bug fixes related to using --generateInterfaces config option for data classes.#161
srinivasankavitha merged 1 commit intomasterfrom
generate-interfaces

Conversation

@srinivasankavitha
Copy link
Contributor

  1. Ensure data classes that have interface fields return the appropriate interface type in getters.
  2. Also ensure generated interface classes for corresponding data classes contain the original super interfaces .

For this schema,

interface Fruit {
    name: String
}
        
type Apple implements Fruit {
    name: String
}
        
type Basket {
  fruit: Fruit
}

the generated IApple interface did not extend Fruit . Also in Basket, the return type of getFruit was IFruit instead of Fruit where IFruit is not generated because it is already an interface.

This PR fixes both these issues.

…. Also ensure generated interface classes contain the correct super interfaces.
@srinivasankavitha srinivasankavitha requested a review from berngp June 4, 2021 21:44
@srinivasankavitha srinivasankavitha changed the title Bug fixes when using config option to generateInterfaces for data classes. Bug fixes related to using --generateInterfaces config option for data classes. Jun 4, 2021
@srinivasankavitha srinivasankavitha merged commit 34e5d46 into master Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants