I have a GraphQL query. I cannot understand why it is not working.
{ repositoryOwner(login: "Naramsim") { login repositories(first: 3, isFork: true, orderBy: {field: CREATED_AT}) { edges { node { description } } } } }
Link
For example, you can order the list of Links alphabetically by their urlor description. For the Hacker News API, you’ll leave it up to the client to decide how exactly it should be sorted and thus include all the ordering options from the Prisma API in the API of your GraphQL server.
The query type defines GraphQL operations that retrieve data from the server. For more information, see " About queries ." Note: For user-to-server GitHub App requests, you should use separate queries for issues and pull requests. For example, use the is:issue or is:pull-request filters and their equivalents.
where & orderBy Skip Edit on Github GraphQL Fundamentals Introduction GraphQL is the better REST Core Concepts Big Picture (Architecture) Clients
To create integrations, retrieve data, and automate your workflows, use the GitHub GraphQL API. The GitHub GraphQL API offers more precise and flexible queries than the GitHub REST API.
You've got an error
Argument 'orderBy' on Field 'repositories' has an invalid value. Expected type 'RepositoryOrder'.
You forget to specify direction which is marked as mandatory. This will work:
{ repositoryOwner(login: "Naramsim") { login repositories(first: 3, isFork: true, orderBy: {field: CREATED_AT, direction: ASC}) { edges { node { description } } } } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With