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

Connections should error if you pass no first or last params #815

Open
orta opened this issue Nov 17, 2017 · 4 comments
Open

Connections should error if you pass no first or last params #815

orta opened this issue Nov 17, 2017 · 4 comments

Comments

@orta
Copy link
Contributor

orta commented Nov 17, 2017

This should give an error:

query CategoriesRendererQuery {
  me {
    ...Categories_me
    __id
  }
}

fragment Categories_me on Me {
  followed_genes {
    edges {
      node {
        id
        __id
      }
    }
  }
}
@mzikherman
Copy link
Contributor

Yea, I always forget that the first time and I'm like why are there zero results, and then i remember.

@orta
Copy link
Contributor Author

orta commented Nov 17, 2017

Yep 👯‍♂️ twice now I've spent ~30m before figuring

@mzikherman
Copy link
Contributor

We generally use https://github.com/darthtrevino/relay-cursor-paging/blob/177eca6975ef7cd602caf2f92edbeed00cabf3b9/src/pageable.ts as the pagination args ,maybe there's some exactly_one_of or some such validation that maybe makes sense?

@orta
Copy link
Contributor Author

orta commented Nov 17, 2017

Aye, given the move towards connections by defaults for lists, I think we'll see ^ come up as people use it more outside of relay

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

No branches or pull requests

2 participants