Skip to content

Tweek's javascript client fetch function should have a simpler option when there's no need to override context #100

@Gabrn

Description

@Gabrn

The api for fetching configurations forces the client to pass a configuration object with a nested context object and another nested object per entity type even if there's no need to override the context and there's a need for only one entity. It is also a little weird for the client in general when the context is part of the options object.

Suggestion:

Create an overload utility function for passing only entity type and id:

await tweekClient.fetch("path/to/configuration", "user", "Yshay", options);

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