Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

improve debug omitProps option #88

Closed
@sibelius

Description

@sibelius

Describe the feature you'd like:

related to this one #70

but I'd like to go deep

We are using Relay in our app, and each fragment has a __fragmentOwner data that could be very large

we want to remove this __fragmentOwner and even more inside props when pretty printing with debug() calls

examples:

sections={
                        Array [
                          Object {
                            "data": Array [
                              Object {
                                "node": Object {
                                  "__fragmentOwner": Object {
                                    "identifier": "query MyestQuery(
....

this is very big (more than 100 lines in terminal)

}>

Suggested implementation:

We can have something like this a sanitizeObject/value that run on value of props - similar to this one https://github.com/entria/entria-fullstack/blob/master/packages/server/test/helper.js#L131

it is a recursive solution

Describe alternatives you've considered:

another solution would be to omit the whole prop all together

Teachability, Documentation, Adoption, Migration Strategy:

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