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

export scalars from entrypoint #48

Open
n1ru4l opened this issue Feb 26, 2024 · 0 comments
Open

export scalars from entrypoint #48

n1ru4l opened this issue Feb 26, 2024 · 0 comments

Comments

@n1ru4l
Copy link
Member

n1ru4l commented Feb 26, 2024

export const federationScalars = new Set([
'_FieldSet',
'link__Import',
'join__FieldSet',
'join__DirectiveArguments',
'policy__Policy',
'requiresScopes__Scope',
]);
export const federationEnums = new Set(['core__Purpose', 'join__Graph', 'link__Purpose']);
export const federationDirectives = new Set([
'link',
'core',
'tag',
'join__graph',
'join__type',
'join__owner',
'join__implements',
'join__unionMember',
'join__directive',
'join__enumValue',
'join__field',
'inaccessible',
]);

We use these in different places within Hive, so we can export them once here and then import them everywhere instead.

https://github.com/kamilkisiela/graphql-hive/blob/e31be54783f0baa3d9a5a6656bb0b032402361f0/packages/services/api/src/modules/schema/providers/registry-checks.ts#L732-L757
https://github.com/kamilkisiela/graphql-hive/blob/e31be54783f0baa3d9a5a6656bb0b032402361f0/packages/services/schema/src/orchestrators.ts#L518-L526

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

No branches or pull requests

1 participant