Hi,
I need a reference to simple GraphQL application and to access the data thro Postman .
Thanks
Hi,
I need a reference to simple GraphQL application and to access the data thro Postman .
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajkiran SwainRank #165 · 14.4K reputationPosted Jun 15, 2023, 11:26 AM EDT
Here are some reference links that can help you learn more about GraphQL and its implementation:
GraphQL.org: The official GraphQL website provides a comprehensive introduction, tutorials, and documentation: https://graphql.org/
GraphQL.js: The JavaScript reference implementation of GraphQL: https://github.com/graphql/graphql-js
Apollo GraphQL: A popular GraphQL platform that offers client and server libraries, tools, and resources: https://www.apollographql.com/
HowToGraphQL: A website that provides tutorials, examples, and best practices for building GraphQL APIs: https://www.howtographql.com/
GraphQL Cheat Sheet: A handy cheat sheet with commonly used GraphQL syntax and concepts: https://devhints.io/graphql
GraphQL with Node.js and Express: A tutorial on building a GraphQL server using Node.js and Express: https://www.robinwieruch.de/graphql-apollo-server-tutorial
GraphQL Playground: An interactive GraphQL IDE for exploring and testing GraphQL APIs: https://www.graphqlbin.com/
Postman Blog - GraphQL: A blog post on using Postman to test GraphQL APIs: https://blog.postman.com/testing-graphql-apis-using-postman/
Tuhin PaulRank #7 · 71.9K reputationPosted Jun 15, 2023, 10:04 PM EDT
https://www.ezzylearning.net/tutorial/building-graphql-apis-in-asp-net-core
Check this article
Brahma Prakash ShuklaRank #633 · 3.8K reputationPosted Jun 23, 2023, 1:52 AM EDT
To create a simple GraphQL application and access the data through Postman, you can follow these steps:
Set up a GraphQL server:
Use Postman to send GraphQL queries:
Here's a basic example of a GraphQL schema, resolver, and using Postman:
GraphQL Schema (schema.graphql):
type Book { id: ID! title: String! author: String! } type Query { books: [Book!]! }GraphQL Resolver (resolver.js):
const booksData = [ { id: '1', title: 'Book 1', author: 'Author 1' }, { id: '2', title: 'Book 2', author: 'Author 2' }, // ... more book objects ]; const resolvers = { Query: { books: () => booksData, }, }; module.exports = resolvers;Start the GraphQL server using Apollo Server (index.js):
const { ApolloServer, gql } = require('apollo-server'); const resolvers = require('./resolver'); const typeDefs = gql` // Paste your GraphQL schema here `; const server = new ApolloServer({ typeDefs, resolvers }); server.listen().then(({ url }) => { console.log(`Server running at ${url}`); });Use Postman to send GraphQL queries:
http://localhost:4000/graphql(assuming the server is running on port 4000).query { books { id title author } }This is a basic example to get you started with GraphQL and Postman. You can expand on this by adding mutations, connecting to a database, or incorporating more complex functionality based on your application's requirements.