Skip to content

Add an option to traverse the mutation result inclusively #49

@BelfordZ

Description

@BelfordZ

The test would look something like:

  it("it has an option for traversing the mutation results inclusively", () => {
    const testSchema = {
      type: "object"
    };
    const mergeProducer = jest.fn((s: CoreSchemaMetaSchema) => ({
      ...s,
      properties: {
        foo: { type: "string" }
      }
    }));

    const opts = { traverseMutationResult: true };

    const result = traverse(testSchema, mergeProducer, opts) as CoreSchemaMetaSchema;

    expect(result.properties).toBeDefined();

    expect(mergeProducer).toHaveBeenCalledTimes(2);
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions