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

Introduce GraphQL endpoint #81

Merged
merged 7 commits into from
Mar 22, 2022
Merged

Introduce GraphQL endpoint #81

merged 7 commits into from
Mar 22, 2022

Conversation

adzialocha
Copy link
Member

@adzialocha adzialocha commented Mar 16, 2022

This PR just adds an GraphQL endpoint to the server, not doing anything yet.

  • Refactor code-base to separate HTTP server functionality more clearly from JSON RPC
  • Introduce async_graphql GraphQL framework
  • Run an /graphql endpoint for POST (queries) and GET (playground) requests

Closes: #73

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@adzialocha adzialocha changed the title Introduce GraphQL Introduce GraphQL endpoint Mar 16, 2022
@adzialocha adzialocha marked this pull request as ready for review March 17, 2022 11:22
Copy link
Member

@sandreae sandreae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for getting the changeover to GraphQL started 👍

@cafca
Copy link
Member

cafca commented Mar 22, 2022

How do I use this? I cargo run and then open the playground at http://localhost:2020/graphql but there i get an error "Server cannot be reached". I thought I could do

{
  ping
}

?

Copy link
Member

@cafca cafca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! I added a small docstring.

The problem I had above - if that was just some mistake I made this can be merged!

@adzialocha adzialocha merged commit 897860c into main Mar 22, 2022
@cafca cafca added this to the GraphQL API milestone Mar 23, 2022
@adzialocha adzialocha deleted the graphql-api branch April 13, 2022 12:34
@adzialocha adzialocha removed this from the GraphQL API milestone May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce new GraphQL API endpoint
3 participants