Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

Type namespace prefixes #67

Open
kbrandwijk opened this issue Dec 23, 2017 · 1 comment
Open

Type namespace prefixes #67

kbrandwijk opened this issue Dec 23, 2017 · 1 comment

Comments

@kbrandwijk
Copy link
Member

kbrandwijk commented Dec 23, 2017

One of the main reasons that different datasources play well together is that they use different prefixes for their types. However, this is neither enforced nor validated. I would like GrAMPS to apply the namespace of the datasource to my types itself, instead of having to do this myself for every type. I think this would make individual datasources a lot more readable, and given that they are always supposed to be processed through GrAMPS, it seems logical that GrAMPS would be in charge of managing those namespaces.

I don't know if there are cases where you explicitly don't want types to be prefixed. If that's the case, then this proposal wouldn't work. In that case, I would some form of validation, instead of depending on mergeSchemas to throw an error.

@grxy
Copy link

grxy commented Dec 26, 2017

@kbrandwijk One of the things I have in my test suites of my GrAMPS server is a check that each of the data sources has a unique namespace. While I see where this sentiment is coming from, I think this solution results in too much magic being done by GrAMPS itself. At the very least, I would argue that if this were to be implemented, it should be opt-in, not opt-out, since I think that many dev teams would want tight control of their GraphQL type names.

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

No branches or pull requests

2 participants