Skip to content

paramsForServer Hook #670

Open
Open
@DaddyWarbucks

Description

@DaddyWarbucks

I think we should update the docs to include an example of how one might use the paramsForServer as a hook.

const paramsForServerHook = (...whitelist) => (context) => {
  context.params = paramsForServer(context.params, ...whitelist);
  return context;
};

I am not a fan of having to use the paramsForServer on every service call and would rather have it work more generically via a client side hook.

I can update the docs at some point, but wanted to capture my solution.

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