Skip to content

GraphQL docs should have backlinks for queryable/filterable by #16721

@jsoref

Description

@jsoref

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/graphql/reference/interfaces
https://docs.github.com/en/graphql/reference/objects

What changes are you suggesting?

Objects offer implements, e.g.:
https://docs.github.com/en/graphql/reference/objects#addedtoprojectevent

AddedToProjectEvent

Represents aadded_to_projectevent on a given issue or pull request.

Implements

Node

Interfaces offer implemented by (functionally a backlink for implements), e.g.:
https://docs.github.com/en/graphql/reference/interfaces#node

Node

An object with an ID.

Implemented by

But, a connection doesn't offer queryable by,
https://docs.github.com/en/graphql/reference/objects#usercontenteditconnection

Consider:
https://docs.github.com/en/graphql/reference/interfaces#comment

userContentEdits (UserContentEditConnection) A list of edits to this content.Argumentsafter (String)Returns the elements in the list that come after the specified cursor.before (String)Returns the elements in the list that come before the specified cursor.first (Int)Returns the first n elements from the list.last (Int)Returns the last n elements from the list.
. userContentEdits (UserContentEditConnection)
. A list of edits to this content.
. Arguments
. after (String)
. Returns the elements in the list that come after the specified cursor.
. before (String)
. Returns the elements in the list that come before the specified cursor.
. first (Int)
. Returns the first n elements from the list.
. last (Int)
. Returns the last n elements from the list.

And nothing in:
https://docs.github.com/en/graphql/reference/objects#user
Tells me that it's reachable via User and Viewer in
https://docs.github.com/en/graphql/reference/queries

When I'm looking at the graphql documentation, I'm trying to find a way to query for a given Object based on a parameters that I have. I'd like to be able to see which objects offer query constraints and yield the thing I'm looking for.

My basic task is "find comments with certain parameters".

For 2021 (through yesterday)
The parameters were:

  • by a certain user (the active user)
  • in a certain org
  • in a certain repository
  • in a certain pr
  • with a comment containing a certain string

The normal graphql for a comment lets me select the things i want (the node_id, and the body).

There are lots of ways for me to try to slice this problem, but without hints about which objects have queries that yield constrained slices with comments, I'm more or less forced to look at each and every object to see if:

  • it has the object i want
  • it has query constraints
    • if those query constraints will help

Additional information

Some of this adventure is viewable here:
https://github.community/t/find-comments-by-github-action-bot-in-a-specific-pr/242080

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content teamgraphqlContent related to GraphQL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions