Skip to content

WIP: POC Explore GraphQL for Geo

Zack Cuddy requested to merge geo-graphql-poc into master

Introduction

Hey @geo-team! This was my exploration of GraphQL in Geo. I'm not sure how helpful this will be, but my intentions were to both learn the syntax of GraphQL in our codebase, as well as provide what I picture as a model for the format of the data the Frontend will expect from issues like #199875 (closed)

Note that this was just a fast prototyping activity I did and the designs are by no means legit or final!

Some important files to note in this MR are:

Blobs GraphQL definition
Blobs GraphQL mock data

How to access this on your machine

Pull down this branch

git fetch origin geo-graphql-poc
git checkout geo-graphql-poc

gdk start and navigate to https://{your_domain}/admin/geo/blobs

What does this MR do?

Once you get to this area you will see two tabs:

Mocked GraphQL (Blobs/Registries)

This is where I have mocked out some data interaction with Blobs and their respected Registries. Note that Graph isn't hooked up here, but this is the sort of data that the frontend will be expecting

Things like:

  • Available Blobs
  • Their Registry entries
  • Registry entries status, path, name

Live GraphQL (Projects/Issues)

This is an actual GraphQL endpoint that already exists in GitLab. The data relationships between Projects and Issues seemed similar to Blobs and Registries so I used these as examples. Note these are actual data points on the GitLab instance and not faked out like the other tab.

GIF

Kapture_2020-02-11_at_15.48.59

What now?

I am curious if a MR like this is helpful to anyone besides myself, so please leave me any comments/feedback you have. Next steps will be to start work on #199875 (closed) and re-base this to fit the actual requests and responses from our own GraphQL Api.

Cheers everyone 🍻 and thank you for taking the time to read this!

Edited by Zack Cuddy

Merge request reports