Queries

Learn how Sofa handles GraphQL queries, transforming them into GET requests. Example code provided to demonstrate query implementation with Sofa. #GraphQL

Queries are transformed into GET requests.

Given the following example:

type Comment {
  id: ID
  text: String
}

type Query {
  comments: [Comment]
}

Sofa will create a GET /comments route.

curl http://localhost:3000/api/comments