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

IDFilter input type for consistency #485

Open
jasonkuhrt opened this issue Oct 15, 2019 · 6 comments
Open

IDFilter input type for consistency #485

jasonkuhrt opened this issue Oct 15, 2019 · 6 comments
Labels
scope/schema type/feat Add a new capability or enhance an existing one

Comments

@jasonkuhrt
Copy link
Member

jasonkuhrt commented Oct 15, 2019

Instead of:

type A {
  id: ID
  s:  String
}
input AWhereInput {
  id: StringFilter
  s:  StringFilter
}

We should have:

type A {
  id: ID
  s:  String
}
input AWhereInput {
  id: IDFilter
  s:  StringFilter
}

There is already precedent for filters that have the same structure: IntFilter / FloatFilter.

@jasonkuhrt jasonkuhrt added type/feat Add a new capability or enhance an existing one scope/schema labels Oct 15, 2019
@jasonkuhrt jasonkuhrt added this to Backlog in Labs Team via automation Oct 15, 2019
@jasonkuhrt jasonkuhrt changed the title ID filter for consistency IDFilter input type for consistency Oct 15, 2019
@dbtek
Copy link

dbtek commented Dec 20, 2019

Apparently I reported this on wrong repository. Closing it on prisma2.

@jasonkuhrt
Copy link
Member Author

jasonkuhrt commented Dec 20, 2019

Reviewing my opening comment, think I made a mistake?

This:

input AWhereInput {
  id: StringFilter
  s:  IDFilter
}

should be:

input AWhereInput {
  id: IDFilter
  s:  StringFilter
}

🤔haha why did I do that before...

@dbtek does that line up with your expectation?

@dbtek
Copy link

dbtek commented Dec 22, 2019

I noticed @jasonkuhrt. If I'm correct, there is no type as IDFilter, ID is used instead.

@jasonkuhrt
Copy link
Member Author

@dbtek that part is intentional. Its a notation used by nexus-prisma docs to communicate GraphQL Schema contributions. More here: https://github.com/prisma-labs/nexus-prisma#how-to-read

@dbtek
Copy link

dbtek commented Dec 23, 2019

Oh I see. Sorry for being such a noob.

@jasonkuhrt
Copy link
Member Author

All ears if you have ideas on how to make that part more accessible! Maybe we should front load that “legend” so if you’re just scrolling down it’ll be more visible...

Sent with GitHawk

@jasonkuhrt jasonkuhrt removed this from Next Quarter in Labs Team Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/schema type/feat Add a new capability or enhance an existing one
Projects
None yet
Development

No branches or pull requests

2 participants