Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(package/gqty): Expose aliasGenerator option and default alias generators #2014

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vicary
Copy link
Member

@vicary vicary commented Sep 7, 2024

  1. Export the default alias generator and its debug counterpart.
  2. Expose new aliasGenerator option
  3. Deprecate aliasLength in favor of aliasGenerator

Example usage:

+ import { createDebugAliasHasher } from "gqty";

export const client = createClient<GeneratedSchema>({
+  aliasGenerator: createDebugAliasHasher(6),
  schema: generatedSchema,
  scalars: scalarsEnumsHash,
  cache,
  fetchOptions: {
    fetcher: queryFetcher,
  },
});
  • Make sure it covers both variable alias and query alias
  • perf: memoizing hashes for Utils/pick.ts

Copy link
Contributor

github-actions bot commented Sep 7, 2024

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant