Querydeck Docs
  • 👋Welcome to Query Deck
  • Getting Started
    • 😃Get Started With QueryDeck
      • Quickstart With QueryDeck
    • How It Works?
  • REST
    • Select Method
      • Joins
      • Sorting
        • Ascending/ Descending ordering
        • Dynamic Sorting
      • Filter
        • Dynamic Filtering
        • Groups
        • Exists clause
      • Pagination
        • Offset
        • Limit
    • Insert/Upsert Method
      • Nested Inserts (Joins)
      • Conflicting Columns
    • Update Method
      • Filters
    • Delete Method
    • Authentication
    • Authorization
    • Select by Id
  • GraphQL
    • Introduction to GraphQL in QueryDeck
    • Enabling GraphQL for Columns in QueryDeck
  • Testing Endpoints
Powered by GitBook
On this page

Testing Endpoints

PreviousEnabling GraphQL for Columns in QueryDeck

Last updated 2 months ago

GraphQL testing allows you to validate and debug your queries, mutations, and subscriptions by sending requests to your QueryDeck endpoint. You can use Postman to efficiently test and interact with the GraphQL APIs.

Prerequisites

  • Ensure you have the GraphQL endpoint (e.g., https://your-querydeck-url/graphql).

  • Postman installed on your system (or use the web version).

Steps to Test GraphQL APIs in Postman

  1. Open Postman Launch Postman and create a new request.

  2. Set Request Type to POST GraphQL queries are sent via HTTP POST requests. Select POST from the dropdown.

  3. Enter the GraphQL Endpoint Paste the QueryDeck GraphQL endpoint in the request URL (e.g., https://your-querydeck-url/graphql).

  1. Configure Headers Ensure the following headers are set:

give some sample query for testing

eg:

{
    "query": "query GetFilms    {\n  film {\n        title\n    description\n    release_year\n    language_id\n    rental_duration\n    rental_rate\n        replacement_cost\n    rating\n    fulltext\n  }\n}",
    "variables": {}
}

Now hit send, and wait for response

Your response should be in a format like the sample below

Content-Type: application/json Authorization: Bearer YOUR_ACCESS_TOKEN (see authentication and authorization section for more info)