---
title: "Discussion on \"[Tip] You may not need any library to query the GraphQL API\" | Hashnode"
description: "Discussion on \"[Tip] You may not need any library to query the GraphQL API\". TLDR;\n\nThe request needs to be sent using the POST method\n\nThe query and variables need to be sent as a JSON object\n\n\n// sample query\nconst query = `\n    query HeroNameAndFriends($episode: Episode) {\n        hero(episode: $episode) {\n            name..."
url: "https://hashnode.com/posts/tip-you-may-not-need-any-library-to-query-the-graphql-api/60c1da0831808952a1d0b6ad"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\[Tip\] You may not need any library to query the GraphQL API](https://blog.rahuldahal.com.np/tip-you-may-not-need-any-library-to-query-the-graphql-api?utm_source=hashnode&utm_medium=feed)

TLDR; The request needs to be sent using the POST method The query and variables need to be sent as a JSON object // sample query const query = \` query HeroNameAndFriends($episode: Episode) { hero(episode: $episode) { name...

Jun 10, 2021 · 2 min read · blog.rahuldahal.com.np  
Updated Aug 12, 2024  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#graphql](https://hashnode.com/tag/graphql)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#vanilla-js-1](https://hashnode.com/tag/vanilla-js-1)

## Written by

[Rahul Dahal](https://hashnode.com/@rahuldahal)

@rahuldahal · Nepal

  
[View profile](https://hashnode.com/@rahuldahal)

Software Engineer

Software Engineer | JavaScript | Specializing in Scalability and DevOps

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
