Add PagesDeployments to Project type
What does this MR do and why?
This MR adds PagesDeployments to the Project Graphql type
How to set up and validate locally
- Set up your GDK to support Runners and Pages
- Create a Pages project, e.g. by creating a project with the "Pages/Plain HTML" template
- Run the pipeline to trigger a Pages deployment
- Visit
http://gdk.test:3000/-/graphql-explorer
and run the below query:
query GetProjectPagesDeployments {
project(fullPath: "<PROJECT_PATH>") {
pagesDeployments {
nodes {
id
active
}
}
}
}
Database Query information
Query
SELECT "pages_deployments".*
FROM "pages_deployments"
WHERE "pages_deployments"."project_id" = 42817607
AND "pages_deployments"."upload_ready" = TRUE
AND "pages_deployments"."deleted_at" IS NULL
AND NOT ((
"pages_deployments"."path_prefix" = ''
OR "pages_deployments"."path_prefix" IS NULL
))
ORDER BY "pages_deployments"."created_at" ASC
Query Plan
Sort (cost=3.45..3.46 rows=1 width=193) (actual time=0.050..0.051 rows=1 loops=1)
Sort Key: pages_deployments.created_at
Sort Method: quicksort Memory: 25kB
Buffers: shared hit=14
I/O Timings: read=0.000 write=0.000
-> Index Scan using index_pages_deployments_on_project_id on public.pages_deployments (cost=0.42..3.44 rows=1 width=193) (actual time=0.025..0.036 rows=1 loops=1)
Index Cond: (pages_deployments.project_id = 42817607)
Filter: (pages_deployments.upload_ready AND (pages_deployments.deleted_at IS NULL) AND (pages_deployments.path_prefix IS NOT NULL) AND (pages_deployments.path_prefix <> ''::text))
Rows Removed by Filter: 4
Buffers: shared hit=11
I/O Timings: read=0.000 write=0.000
Edited by Janis Altherr