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.

Handling of relay connections

See original GitHub issue

Hello! First let me say, kudos for this library, it’s a lifesaver 😃

I have a question regarding Relay connections.

When I try to optimize queries involving relay connections, I get the following error:

graphql.error.located_error.GraphQLLocatedError: 'ConnectionOptions' object has no attribute 'model'

But AFAIK, I cannot specify a model on relay connections subclasses.

class TeamConnection(relay.Connection):
    class Meta(object):
        node = TeamNode
        model = TeamMembership  # this wont work

Do you have any idea about how I could make this work? I’d be glad to help with a PR if you give me some directions.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tfoxycommented, Sep 22, 2018

Fixed in v0.3.4!

1reaction
tfoxycommented, Jul 6, 2018

Hi! I’m using this library with Apollo instead of Relay. So I didn’t test how it works with Relay nodes. I’m not on a computer right now, but let me first check how can I make it work with Relay so that I can give you any directions if a PR is needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Connections | Relay
Querying a list of data in discrete parts is usually known as Pagination. Specifically in Relay, we do this via GraphQL fields known...
Read more >
Electrical Relay and Solid State Relays for Switching
Extending the life of relay tips by reducing the amount of arcing generated as they open is achieved by connecting a Resistor-Capacitor network...
Read more >
How a Relay Works - How to Connect N/O, N/C Pins
We can clearly see that initially the central pole is held connected with the N/C contact, and when the coil is energized, the...
Read more >
Relay Connection | Relay Working Principle | - YouTube
Relay Wiring Diagram | Relay Connection | Relay Working Principle |A Relay is an electromechanical device that can be used to make or...
Read more >
How to Connect a Relay in a Circuit: Types of Relays and Uses
When mounting electromagnetic relays to a PCB, check whether the relay is unsealed, sealed, or is a flux-protection relay. Because an unsealed ...
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