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

Accept a function as gatsbyTypePrefix . #61

Open
AbdallahAbis opened this issue Mar 30, 2022 · 0 comments
Open

Accept a function as gatsbyTypePrefix . #61

AbdallahAbis opened this issue Mar 30, 2022 · 0 comments

Comments

@AbdallahAbis
Copy link

I'm working with Sanity Graphql, some remote schema types use TypeName and others use SanityTypeName, how can I achieve all generated Gatsby types say SanityRemoteTypeName, providing a gatsbyTypePrefix = "Sanity" will cause some types to become SanitySanityRemoteTypeName and not providing any gatsbyTypePrefix will result in some fields being RemoteTypeName.

So I think gatsbyTypePrefix option should accept a function that will get passed the RemoteTypeName and it will check if it's already prefixed with Sanity then do nothing otherwise prefix with Sanity

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