CSC/ECE 517-GH-2401-Rest-GraphQL-Endpoints: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:


=== User Gists ===
=== User Gists ===
This query returns the gists of the authenticated user.


==== GraphQL Endpoint ====
==== GraphQL Endpoint ====
Line 21: Line 23:


=== User Issues ===
=== User Issues ===
This query returns the issues of the authenticated user.
   
   
==== GraphQL Endpoint ====
==== GraphQL Endpoint ====
Line 29: Line 33:


=== User Pull Requests ===
=== User Pull Requests ===
This query returns the pull requests of the authenticated user. For the REST query, we can only fetch pull requests for a particular repository for the authenticated user.
   
   
==== GraphQL Endpoint ====
==== GraphQL Endpoint ====
Line 37: Line 43:


=== User Repositories ===
=== User Repositories ===
This query returns the repositories of the authenticated user.
   
   
==== GraphQL Endpoint ====
==== GraphQL Endpoint ====
Line 45: Line 53:


=== User Repository Discussions ===
=== User Repository Discussions ===
This query returns the repository discussions of the authenticated user. For the REST query, there is no REST query to fetch repository discussions, hence this endpoint does not return any results.
   
   
==== GraphQL Endpoint ====
==== GraphQL Endpoint ====

Revision as of 18:29, 24 March 2024

About

The project involves developing API endpoints for GitHub GraphQL queries and GitHub REST queries and to integrate these endpoints into the Python Flask framework, enabling the publication of these queries as accessible API endpoints via URLs. We have implemented endpoints for 4 query elements: comment, contributions, profiles and time_range_contributions. Each element contains multiple queries and each query has a separate endpoints for both GraphQL and REST API implemented.

Setup

Endpoints

Comments

Contributions

User Gists

This query returns the gists of the authenticated user.

GraphQL Endpoint

'/api/graphql/user-gists/<username>'

REST Endpoint

'/api/rest/user-gists/<username>'

User Issues

This query returns the issues of the authenticated user.

GraphQL Endpoint

'/api/graphql/user-issues/<username>'

REST Endpoint

'/api/rest/user-issues/<username>'

User Pull Requests

This query returns the pull requests of the authenticated user. For the REST query, we can only fetch pull requests for a particular repository for the authenticated user.

GraphQL Endpoint

'/api/graphql/user-pull-requests/<username>'

REST Endpoint

'/api/rest/user-pull-requests/<username>/<repo>'

User Repositories

This query returns the repositories of the authenticated user.

GraphQL Endpoint

'/api/graphql/user-repositories/<username>'

REST Endpoint

'/api/rest/user-repositories/<username>'

User Repository Discussions

This query returns the repository discussions of the authenticated user. For the REST query, there is no REST query to fetch repository discussions, hence this endpoint does not return any results.

GraphQL Endpoint

'/api/graphql/user-repository-discussions/<username>'

REST Endpoint

'/api/rest/repository-discussions/<username>/<repo>'

Profiles

Time Range Contributions