LoginRadius / engineering-portal

A collection of valuable resources by developers -- for developers -- to share practical learnings, development challenges, and open-source initiatives in dev, QA, Infra, and implementation.
https://www.loginradius.com/blog/
MIT License
93 stars 259 forks source link

Code duplication - GraphQL queries #767

Open raghunath-r-a opened 2 years ago

raghunath-r-a commented 2 years ago

GraphQL queries are duplicated at many places in the templates.

Please remove those duplicate queries to help improve code quality.

aloks98 commented 2 years ago

@raghunath-r-a Hey! I can work on this as I have exp with graphql. Can I get some info what kind of queries we are looking at?

mohammed786 commented 2 years ago

Hi, @aloks98 Below is the frontmatter format that will be used for Graphql queries:

---
title: "<Title>"
date: "2017-04-07"
coverImage: "<relative path>"
author: "<Author id which is linked to the author.yaml file>"
tags: ["Engineering","JavaScript","Hacks","Array"]
description: "<Short description>"
pinned: <boolean - used to showcase the blog at the top>
---

From the above frontmatter we are:

So the queries are written for the above filters, it has the scope of optimization, you can go ahead and have a look at the queries and let me know your thoughts on it and how we can improve the performance by modifying it.

Thanks !!!

raghunath-r-a commented 2 years ago

Hi @aloks98 This is now assigned to you. You may go ahead and work on this.