10/10/2023 0 Comments Express graphqlIf you have not connected to MongoDB in your project. Install MongoDB and connect to database part 2. That means, the following query: query = await createGraphQLSchema(oas) įor further details, refer to the openapi-to-graphql-cli documentation. conoscenza di framework e librerie: Node.js, Express. Create GraphQL API in Expressjs Project Using Apollo Server Express. So to execute a query you need to transform it to string and pass it to the body. GraphQL Tutorial Beginner - Learn GraphQL in NodeJS / ExpressJS PedroTech 126K subscribers Subscribe 67K views 2 years ago PedroTech React Tutorials In this video, I will teach you guys the. This is how the preview of this swagger documentation looks like:Īs you can see it only describes that a query is accepted but it does not describe which queries. Here is the swagger yaml that I created: swagger: "2.0" I found out that it is not possible to document all the queries in swagger but it is possible to such a degree so that it is usable. What I basically did is I described the GraphQL as if it was a REST API - well basically it is: it is a HTTP endpoint, it uses the POST method, it posts json data in the body and it receives json as an answer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |