replicatedhq / kotsadm

Kotsadm has been merged into the KOTS repo
https://github.com/replicatedhq/kots
Apache License 2.0
248 stars 9 forks source link

There are currently too many client-side Graphql queries made on load #764

Open marccampbell opened 4 years ago

marccampbell commented 4 years ago

Currently, when loading the application dashboard, the front end make a lot of different graphql queries. Taking a look through these, it looks to be pretty inefficient and ad-hoc.

For example, switching tabs calls getApp and getLicenseType and getMetadata. Why do we need three calls? Shouldn't GraphQL be letting the client construct queries that make this a easier?

We currently hard code the queries in the client so that the react components don't construct the query they need, which results in a lot of duplication of queries and inefficiencies. In short, this is making the GraphQL implementation in this project function more like REST, but without status codes.

I think we need to document a strategy here to get this under control before we run into concurrent socket limits and/or put too much load on the kotsadm-api requesting duplicate data.

marccampbell commented 4 years ago

All of these are slowly being migrated to the kotsadm Go Rest API