Class GraphQLBodyDTO

All Implemented Interfaces:
DTO<Body<?>>

public class GraphQLBodyDTO extends BodyDTO
  • Constructor Details

    • GraphQLBodyDTO

      public GraphQLBodyDTO(GraphQLBody graphQLBody)
    • GraphQLBodyDTO

      public GraphQLBodyDTO(GraphQLBody graphQLBody, Boolean not)
    • GraphQLBodyDTO

      public GraphQLBodyDTO(Body.Type type, Boolean not, Boolean optional, String query, String operationName, String variablesSchema, SelectionSetMatchType selectionSetMatchType, List<String> fields, String schema)
      Jackson entry point for the one place a GraphQLBodyDTO is deserialised by field type rather than through BodyDTODeserializer: HttpWebSocketResponseDTO.getGraphqlSubscriptionFilter(). That field is declared as the concrete subtype, so the polymorphic body deserialiser — which is registered against BodyDTO and matched by exact class — never runs for it, and without a creator Jackson cannot instantiate this all-final type at all.

      type is accepted so the "type":"GRAPHQL" discriminator emitted by GraphQLBodyDTOSerializer round-trips, but it is deliberately ignored: the body type is fixed by the class itself. Accepting it explicitly keeps this working regardless of the mapper's FAIL_ON_UNKNOWN_PROPERTIES setting.

      The @JsonCreator annotation is intent, not mechanism, and no test guards it. Jackson already treats a constructor whose parameters carry @JsonProperty as an implicit property-based creator, so deleting the annotation alone leaves every test green — this was confirmed by mutation. What is load-bearing is the CONSTRUCTOR: remove it and control-plane expectations carrying a graphqlSubscriptionFilter are rejected outright. The annotation is kept so the intent survives a future reader, not because anything currently fails without it.

  • Method Details