Posted in Back-End & Database, Python

Flask RestAPI with requests

Introduction: Requests is a Python module that you can use to send all kinds of HTTP requests. It is an easy-to-use library with a lot of features ranging from passing parameters in URLs to sending custom headers and SSL Verification. we can use requests library very easily like this. import requestsreq = requests.get(‘https://www.excellencetechnologies.in/’) Now let’s install […]

Posted in Back-End & Database, GraphQL

GraphQL Fragments

Fragments is also a very important concept in GraphQL. This is used to group re-usable code together. To get a basic understanding about this, read the below blog post its very simple and easy to understand https://medium.com/graphql-mastery/graphql-fragments-and-how-to-use-them-8ee30b44f59e Let’s see how we can us it in our todo application. In our app all queries, mutations are […]

Posted in Back-End & Database, GraphQL

GraphQL Subscription

Subscription is another type of in GraphQL. This is use real time events using websockets, you can send notification to client for events which happen on the server using web sockets. It you are not aware what are websockets, you can find plenty of resources online. Let’s see how to implement subscription in our code […]

Posted in Back-End & Database, GraphQL

GraphQL Apollo Server

Till now we have been using a simple graphql-express middleware as a gql server. https://github.com/apollographql/apollo-server  Apollo-Server provides a full feature gql server which is production ready and should be used for most applications. Let’s move our code base to apollo-server First install via Also we don’t need graphql-tools anymore as it is inbuilt in apollo-server […]

Posted in Back-End & Database, GraphQL

GraphQL Mutations

Till now we have only seen how to fetch data and gone quite deep into it. Now let’s see the how we can update data i.e POST, PUT, DELETE requests We need to use mutations for it. Mutation also follow exact similar pattern as Query. Let’s define a mutation to add a new profile data […]