On Tue Mar 14, 2023 at 8:21 AM EDT, Thorben Günther wrote:
> ticket(id: Int!): Ticket! @access(scope: TICKETS, kind: RO)> tickets(cursor: Cursor): TicketCursor! @access(scope: TICKETS, kind: RO)> + labelByName(name: String!): Label> labels(cursor: Cursor): LabelCursor!
Why not call this label(name)? Since I don't think we'll need any other
label field. This will make it match with User.tracker(name).
On Tue, Mar 14, 2023 at 08:37:55AM -0400, Adnan Maolood wrote:
> On Tue Mar 14, 2023 at 8:21 AM EDT, Thorben Günther wrote:> > ticket(id: Int!): Ticket! @access(scope: TICKETS, kind: RO)> > tickets(cursor: Cursor): TicketCursor! @access(scope: TICKETS, kind: RO)> > + labelByName(name: String!): Label> > labels(cursor: Cursor): LabelCursor!>> Why not call this label(name)? Since I don't think we'll need any other> label field. This will make it match with User.tracker(name).
Okay, if you don't plan to introduce a labelByID field, I'll send a v3
with the rename.
On Tuesday, March 14th, 2023 at 14:46, Thorben Günther <admin@xenrox.net> wrote:
> On Tue, Mar 14, 2023 at 08:37:55AM -0400, Adnan Maolood wrote:> > > On Tue Mar 14, 2023 at 8:21 AM EDT, Thorben Günther wrote:> > > > > ticket(id: Int!): Ticket! @access(scope: TICKETS, kind: RO)> > > tickets(cursor: Cursor): TicketCursor! @access(scope: TICKETS, kind: RO)> > > + labelByName(name: String!): Label> > > labels(cursor: Cursor): LabelCursor!> > > > Why not call this label(name)? Since I don't think we'll need any other> > label field. This will make it match with User.tracker(name).> > Okay, if you don't plan to introduce a labelByID field, I'll send a v3> with the rename.
It seems pretty common in GraphQL APIs to have a single query with
multiple possible filters, e.g.
label(name: String, id: Int)