opentargets / issues

Issue tracker for Open Targets Platform and Open Targets Genetics Portal
https://platform.opentargets.org https://genetics.opentargets.org
Apache License 2.0
12 stars 2 forks source link

Migrate graphQL queries in platform-app to GQL files #1420

Closed d0choa closed 3 years ago

d0choa commented 3 years ago

After discussion derived from #1418, it was concluded that we should migrate as many queries as possible to .gql files.

It was discussed that some queries were so concise that they were not moved to an outside file. We see a point now to separate them from the rest of the code. Also, some of the queries are dynamically changed, so we will need to consider the dynamic parameters for future applications (e.g. testing).

A list of the currently implemented GQL files:

❯ find platform-app -type f -name "*.gql"
platform-app/src/sections/evidence/CancerGeneCensus/sectionQuery.gql
platform-app/src/sections/evidence/OTGenetics/sectionQuery.gql
platform-app/src/sections/evidence/GenomicsEngland/sectionQuery.gql
platform-app/src/sections/evidence/EuropePmc/sectionQuery.gql
platform-app/src/sections/evidence/Phenodigm/sectionQuery.gql
platform-app/src/sections/evidence/Gene2Phenotype/sectionQuery.gql
platform-app/src/sections/evidence/IntOgen/sectionQuery.gql
platform-app/src/sections/target/ProteinInformation/sectionQuery.gql
platform-app/src/sections/target/ProteinInformation/summaryQuery.gql
platform-app/src/sections/target/Safety/summaryQuery.gql
platform-app/src/sections/target/ProteinInteractions/sectionQuery.gql
platform-app/src/sections/target/ProteinInteractions/summaryQuery.gql
platform-app/src/components/Search/SearchQuery.gql
platform-app/src/pages/SearchPage/SearchPageQuery.gql

Next, the queries that need to be migrated, resulting from the next query:

❯ find platform-app -type f -name '*.js' -exec grep -H "= gql\`" {} \;
mkarmona commented 3 years ago

@d0choa thanks! this will be really convenient to help with systematic API testing.

andrewhercules commented 3 years ago

Epic ticket closed as the work noted in tickets #1526, #1527, #1528, and #1529 has been completed and merged into main