crashappsec / gql_schema_codegen

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

Fields in parent classes are omitted from CreateInput directives #12

Open nettrino opened 1 year ago

nettrino commented 1 year ago

Classes like UserAccount which inherit from other classes don't re-define their fields (e.g., name is not part of the UserAccount class in the generation bits as it is part of the Account class assuming the following spec:

  interface Account {
    name: String!
  }

  """
  An individual user account
  """
  type UserAccount implements Account {
    email: Email! @unique
    name: String!
    avatarURL: String
    type: NodeType! @default(value: USER_ACCOUNT)
    definedIn: ResourceEntity @relationship(type: "HAS_ACCOUNT", direction: IN)
  }

However, the fields should be emitted for the CreateInput versions of the classes to be used in mutations

nettrino commented 1 year ago

This is related to directives being improperly parsed.