question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

documention on Union

See original GitHub issue

Hi guys,

Quite new graphene to, I read on the graphql.org website, http://graphql.org/learn/schema/#union-types. There is this way to define a union type:

union SearchResult = Human | Droid | Starship

It seems that there is code about Union in the source, but not the documentation, just want to know Is this already supported in graphene and just lacking of doc?

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
waxisiencommented, Jul 24, 2017

@whalesalad Does your query contain an inline Fragment http://graphql.org/learn/queries/#inline-fragments ? Since the union returns different types you need a query like this :

{
  search {
    __typename
    ... on CashContract{
      id
      contract_status
    }
    ... on FuturesContract{
      expiration_date
    }
  }
}
0reactions
lisongxcommented, Jul 25, 2017

@syrusakbary Hi Syrus, actaully I opened this issue because of this is any docs about using Union on our http://graphene-python.org/ website, maybe we could still let this open?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Your Right to Union Documents and Financial Information
TDU can provide a sample letter to local unions requesting these documents. Financial Records The IBT and all U.S.-based joint councils, conferences, ...
Read more >
Documentation to the Union Sample Clauses - Law Insider
Documentation to the Union. Copies of all transcripts, documents and correspondence filed with respect to the grievance shall be sent to LUC-AAUP as...
Read more >
Union Right to Information
Please provide all documents, reports, and other evidence utilized in making the decision to discipline the employee. Disciplinary grievance. When grieving ...
Read more >
union — Python Reference (The Right Way) 0.1 documentation
Returns a new set with elements from the set and the specified iterables. Syntax¶. set. union(iterable, …) iterable, … Required. Iterable or multiple...
Read more >
Documenting Labor Inside and Out Collective Bargaining ...
The contracts negotiated by labor unions with management document those terms of employment. Just as labor unions and their locals come in various...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found