-
Notifications
You must be signed in to change notification settings - Fork 147
inferSchema shouldn't generate types that begin with non-alphanumeric characters #427
Comments
Would this mean that all generated types would drop the "_" prefix? That would be very helpful in a couple use cases of my own, where the underscore prefix creates issues with other codegen libraries I'd like to use in combination w/ this one. Or, alternatively, the capacity to specify a prefix other than underscore for generated types. |
@johnymontana Any thoughts on the above? If it's the case that future version of this lib will / could generate types w/o the leading underscore, that would be an extremely useful feature. |
@Phylodome I was thinking of just ignoring any node labels that begin with The example here was handling nodes added by Neo4j Bloom that define the perspective - metadata specific to the Neo4j Bloom application and not something that should be exposed in the GraphQL API. Allowing more flexible naming conventions for the generated input types is an interesting idea, but I think is beyond the scope of this specific problem relating to inferSchema. I'd like to learn more about the issues you're having with other codegen libraries. Could you create another issue with some examples of the problems you have there? |
No problem. I detailed the issue in #437. If you'd like more information let me know, but the fundamental issue is pretty simple. |
Neo4j node labels can begin with non-alphanumeric characters (such as
_
). Currently the inferSchema process creates a GraphQL type for these node labels with the same name.In the case where we have a Neo4j node label such as
_Bloom_Perspective
inferSchema should not create a GraphQL type that violates this requirement of the GraphQL specification. For example, the following type is problematic because the associated input types will follow the convention of prepending the type name with_
will generate__Bloom_Perspective_Input
Would it make sense for the inferSchema process to ignore any node labels that begin with the
_
character as this is likely to be metadata and not relevant for the GraphQL API?The text was updated successfully, but these errors were encountered: