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

Conflict because they return conflicting types #310

Open
pgorin opened this issue Dec 7, 2017 · 1 comment
Open

Conflict because they return conflicting types #310

pgorin opened this issue Dec 7, 2017 · 1 comment
Labels

Comments

@pgorin
Copy link

pgorin commented Dec 7, 2017

Hi guys!

Maybe I'm referencing about an issue already discussed.
I'm actually getting an error when executing a graphQl query which returns a UnionType with two different implements but sharing a field with the same name and different type.

I have looking for this issue and I found a topic called "safe divergence". Is this situation behind this concept?

I can't understand why two fields can conflict if they belong to two different implementations of a UnionType.

This is my example:

... on ManualCancellation {
reason --> of type A
}
... on AutomaticCancellation {
when
reason --> of type B
}

I hope you can guide me about this issue.
Thanks,
Patricio.

@OlegIlyenko
Copy link
Member

In general yes, I think so. Have you already see this discussion? graphql/graphql-js#53 I think it provides some context. Do you think that sangria implements this validation differently from reference implementation? (in other words, sangria's implementation is more strict)

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

No branches or pull requests

2 participants