crashappsec / gql_schema_codegen

A module to generate Python typings from a GrapqhQL schema
MIT License
0 stars 1 forks source link

Don't inherit from both interfaces if one interface inherits from another #8

Closed nettrino closed 1 year ago

nettrino commented 1 year ago

Given the GraphQL

  interface ResourceEntity {
  ...
  }

  interface CloudResourceEntity implements ResourceEntity {
  ...

  }

   type AWSCloudPlatform implements CloudPlatform & CloudResourceEntity & ResourceEntity {
   ...
  }
@dataclass(kw_only=True)
class AWSCloudPlatform(CloudPlatform, ResourceEntity, CloudResourceEntity):
  ...

whereas the right code to be emitted is

@dataclass(kw_only=True)
class AWSCloudPlatform(CloudPlatform, CloudResourceEntity):
  ...