Skip to content

Allow configure mode default + support all transforms on all sources #1930

Open
@ntziolis

Description

@ntziolis

Part 1:
As of right now wrap is default mode for transforms. If a bare mode is supposed to be used it needs to be configured for each transform individually.

We propose adding the ability to override this default:

  • on root level of config
  • and (potentially) on source level config

Part 2:
As of right now not all transforms can be used with graphql sources due to not supporting wrap mode. When applying a bare transform on graphql source there currently is no error thrown the transform simply doesn't get applied. It took us a day or so to figure out what went wrong. While this could be mitigated by throwing an error, not being able to apply all transform to graphql source adds complexity for users to understand and reduces the supported scenarios for graphql mesh.

We propose:

  • any transform should be able to apply on any source (this means all transforms would need to support wrap mode in addition to bare).
  • Should a source not support bare transforms, the source should ignore any mode settings and apply wrap transforms

This reduces the potential for miss configuration as well as simplify the messaging:

  • Any transform can be applied on any level
  • Transforms have 2 modes wrap and bare with bare being more performant
  • However bare mode can't be used on graphql sources, any transform on graphql sources will always use wrap mode no matter the configuration

Related issues: #1891 #1928

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions