Skip to content

Avoid GraphQL type name collisions #31

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

Closed
jorgebay opened this issue Apr 1, 2020 · 0 comments · Fixed by #33
Closed

Avoid GraphQL type name collisions #31

jorgebay opened this issue Apr 1, 2020 · 0 comments · Fixed by #33
Assignees
Labels
enhancement New feature or request

Comments

@jorgebay
Copy link
Contributor

jorgebay commented Apr 1, 2020

Certain table names combinations could cause collisions in the generated names for types.

For example:

tables named: tbl_something and tbl_something_input will try to use the names TblSomethingInput for 2 different tasks.

We should make sure unique names are generated. We can do that by storing the names of the graphql types generated and add increments only if there is an existing type with the same name.

In the example above, it would be:

type TblSomethingInput {}
input TblSomethingInput2 {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant