datamodel-code-generator icon indicating copy to clipboard operation
datamodel-code-generator copied to clipboard

Graph QL types inheritance handling

Open mahak999 opened this issue 7 months ago • 0 comments

Is your feature request related to a problem? Please describe.

We want to create python classes for operation signature as well. For example in this quqry:

mutation setResolutionsForULisa($input: SetResolutionsStepInput!, $someRandomFlag: Boolean!){ __typename setResolutions( input: {sessionContext: "something, selectedResolutions: [ { id "xxx", type: SOMETHING } ] } ) { isSomething @include(if: $someRandomFlag) stepOutput { isStepSuccessful eligibleReturn { identifier returnTransportationOptions { planName planType pickupTimeSlotOptionList { timeSlotId } } } } } }.

Describe the solution you'd like currently the library can generate the Pydantic classes for SetResolutionsStepInput and for the output of setResolutions. However, we're also looking for the class generation for the mutation class setResolutionsForULisa as something like

class SetResolutionsForULisa { input: SetResolutionsStepInput someRandomFlag: Boolean! }

Describe alternatives you've considered N/A

Additional context N/A

mahak999 avatar Apr 24 '25 01:04 mahak999