# Existing GraphQL Services

Here's a list of all the existing GraphQL services at The Orchard, where they are, what they do. Need a new service?
You should check here first to see if one already exists that might be a better candidate.

If you still need a new service, duplicate and complete [this simple form](https://docs.google.com/document/d/1M5OaDMRPe3K7rn_kztFo_O5uEq-GW8eocYrY1pDpeVo/edit).
Then add it to the agenda of [the graph refinement weekly meeting](https://meet.google.com/cex-ustc-jxm)

## [`graphql-abacus`](https://github.com/theorchard/graphql-abacus)
`graphql-abacus` is used to consolidate communication to the many Abacus related ows services, which are all backed by one
[royalty_accounting](https://github.com/theorchard/database/blob/master/royalty_accounting/build/README.md) mysql database.
Part of the federation, but insular in usage -- it is used primarily by the Abacus orchard-suite application to orchestrate
accounting runs. 

`Abacus` is an acronym for `Accounting by Accelerated Calculation Using Scale`.
* [Repository](https://github.com/theorchard/graphql-abacus)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-abacus-pipeline)

## [`graphql-content-review`](https://github.com/theorchard/graphql-content-review)
`graphql-content-review` is under contstruction by [#content-review-team](https://orcd.slack.com/archives/C01U623T79R).
* [Repository](https://github.com/theorchard/graphql-content-review)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-content-review-pipeline)

## [`graphql-gateway`](https://github.com/theorchard/graphql-gateway)
`graphql-gateway` is responsible for delegating resolution of GraphQL requests to all other
existing GraphQL services at The Orchard. More information about how this works and why it exists is available in 
the [federation section](../principles/federation.md) of this documentation.
* [Repository](https://github.com/theorchard/graphql-gateway)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-gateway-pipeline)

## [`graphql-knowledge`](https://github.com/theorchard/graphql-knowledge)
`graphql-knowledge` is a repository directly connected to the Neo4J knowledge graph database. This service is primarily 
responsible for retrieving the relationships between entities at The Orchard, as well as providing their associated 
metadata.
* [Repository](https://github.com/theorchard/graphql-knowledge)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-knowledge-pipeline)

## [`graphql-knowledge-search`](https://github.com/theorchard/graphql-knowledge-search)
`graphql-knowledge-search` is a repository directly connected to a ElasticSearch database. This service is primarily 
responsible for searching the music graph.
* [Repository](https://github.com/theorchard/graphql-knowledge-search)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-knowledge-search-pipeline)

## [`graphql-participant`](https://github.com/theorchard/graphql-participant)
Needs to be filled in please.
* [Repository](https://github.com/theorchard/graphql-participant)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-participant-pipeline)

## [`graphql-podcast`](https://github.com/theorchard/graphql-podcast)
Needs to be filled in please.
* [Repository](https://github.com/theorchard/graphql-podcast)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-podcast-pipeline)

## [`graphql-product`](https://github.com/theorchard/graphql-product)
This is where it all began! `graphql-product` started as a service meant to display recent and upcoming products for
workstation, but quickly evolved into a service for powering all requests for
[`orchardgo`](https://github.com/theorchard/orchardgo). At the same time, many other teams at The Orchard began to adopt
GraphQL... so before we federated our graph, this is where all server-side GraphQL logic was implemented. As a result, 
this service has become somewhat of a monolith.

Generally speaking, if you're looking for somewhere for your GraphQL
logic to live, this is probably the wrong place (unless you're focused on analytics).
* [Repository](https://github.com/theorchard/graphql-product)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-product-pipeline)

## [`graphql-publishing`](https://github.com/theorchard/graphql-publishing)
Needs to be filled in please.
* [Repository](https://github.com/theorchard/graphql-publishing)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-publishing-pipeline)

## [`graphql-sr-delivery`](https://github.com/theorchard/graphql-sr-delivery)
This needs to be filled in please.
* [Repository](https://github.com/theorchard/graphql-sr-delivery)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-sr-delivery-pipeline)

## [`graphql-switchboard`](https://github.com/theorchard/graphql-switchboard)
`Switchboard` uses this to ask for Project, Product, Track, Participant and Label information.
It then calls various Orchard microservices to get the data and return it to `Switchboard`.
`Switchboard` is the interface between The Orchard and SME as far as music data is concerned.
* [Repository](https://github.com/theorchard/graphql-switchboard)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-switchboard-pipeline)

## [`graphql-user`](https://github.com/theorchard/graphql-user)
`graphql-user` exposes various Identity, Profile, and Permissions-related calls that are used to read and modify per-application resource access via [frontend-settings](https://github.com/theorchard/frontend-settings). For some background on what all the terms in the previous sentence mean, [check out the docs](https://docs.google.com/presentation/d/1TAHkzbGDYdZa8c8_lfn79KzKFEe4g6_snOZ5t4AEBU4/edit#slide=id.p).

For legacy reasons, the Profile type and basic access checks like the Account query are surfaced in `graphql-product`, but related new functionality should probably be added here. 

Nearly all of the underlying data entities touched by `graphql-user` are stored in the Neo4j graph database. Most of the `graphql-user` mutations hit [ows-users](https://github.com/theorchard/ows-users) or [ows-permissions](https://github.com/theorchard/ows-permissions), although direct connections to Neo4j are also being added and evaluated.

* [Repository](https://github.com/theorchard/graphql-user)
* [Pipeline](https://pipeline.theorchard.io/job/graphql-user-pipeline)
