apache / age

Graph database optimized for fast analysis and real-time data processing. It is provided as an extension to PostgreSQL.
https://age.apache.org
Apache License 2.0
2.97k stars 403 forks source link

Initial Research for Supporting GraphQL #290

Open JoshInnis opened 1 year ago

JoshInnis commented 1 year ago

Initial Task to discuss the development for GraphQL Support of Apache AGE. Please comment here to be assigned to the project.

https://spec.graphql.org/October2021/

ChitraChaudhari commented 1 year ago

to be assigned to the project

malzubairi commented 1 year ago

to be assigned to the project.

shirinmk commented 1 year ago

to be assigned to the project.

kirill-develops commented 1 year ago

Looking forward to being a part of this project!

JoshInnis commented 1 year ago

Welcome everyone so far, I have included a link to the most recent GraphQL specification that we will be attempting to implement. Please review this and leave any comments/questions issues either about that or anything else here.

ChitraChaudhari commented 1 year ago

Is there any specific timeline we should finish reviewing GraphQL specifications?

JoshInnis commented 1 year ago

There is not a specific timeline. To be clear, we are not looking for you to memorize the entire standard. What we are expecting from you guys is, to look over the specification and have a general idea of how GraphQL works. Don't just look at this url. Also checkout the whole site as well: https://graphql.org/

What we need to do here is to create a dialog about how this can be implemented. There are several ideas the AGE team has on how to do it, but we want to know what you think as well. It might be useful to checkout an implementation or two, found here: https://graphql.org/code/

kirill-develops commented 1 year ago

Hey Josh, I have a base understanding of GraphQL on the user-end side of things, at least at a high level. I'm wondering if you have some resources to better understand AGE to better grasp how this may differ from applying to a PostgreSQL or MySQL DB. This is all very new and I want to be time considerate and focus on the most important ideas before I dive deeper.

kirill-develops commented 1 year ago

I took a look at the slides again that I saw you uploaded to the intro to AGE project.

The big take away was there are three unique types to AGE: vertices, edges and paths, with the first two being JSON data types and the later being an array/list of alternates of the former two. They are stored in AGE labels. DB complexity is something I am still tackling, so the purpose of these data types is over my head at the moment. A 15min zoom call at any time just to clarify would go a long way.

Nonetheless, we are looking to integrate GraphQL on querying and modifying these data types, that I believe are only accessed through the cypress command. And GraphQL needs an initial schema to understand the relationships of data and how to find the eventual user’s query. The issue if I’m understanding correctly is, GraphQL will interpret the cypress command like postgreSQL, as normal function calls unless we intercept it to run the Cypress command which will provide AGE’s tables(labels) and data(vertices/edges/paths). Is that correct?

JoshInnis commented 1 year ago

We are planning a webinar for a technical explanation as to how AGE works. But there are no dates set. I suppose we could setup a meeting before that if you have a list of questions. However, I will also try to answer your questions here.

JoshInnis commented 1 year ago

As you mentioned, there are three unique data types are used to represent entities in a graph, and there is a second aspect for how it is stored in Postgres. The second part of that presentation.

For the datatypes, the openCypher specification works in such a way that the existing datatypes in Postgres could not suit our needs. So we created Agtype, which is based on JSONB (one of postgres's two implementations of the Json standard).

The issue if I’m understanding correctly is, GraphQL will interpret the cypress command like postgreSQL, as normal function calls unless we intercept it to run the Cypress command which will provide AGE’s tables(labels) and data(vertices/edges/paths). Is that correct?

GraphQL is a query language, like cypher. We have already implemented cypher and GraphQL should not handle a cypher command.

Personally, I see two ways to do this:

  1. Create a function like cypher and create a second query language in AGE. The reason this works the way it does is the third section in the webinar.
  2. Create an API that accepts GraphQL commands and converts them to Cypher Commands, and is an intermediate between a client and the server. There may be several other ways to do it as well.
malzubairi commented 1 year ago

Hello Josh and everyone!

In terms of your two ways to implement the GraphQL query language, I think the first way is better because we won't need an intermediate language to run the GraphQL Language. Most of the time, I expect the query to run in the hug data. Also, if there is a bug in the Cypher, it could make the query fail to run or give an unexpected result. This makes the first method much safer because it runs as a separate component and is much easier to troubleshoot. Implementing GraphQL along with Cypher also makes an advantage of using AGE because it allows for more than one query language to be used with Graph DB.

This is my personal opinion!

karthikreddy-02 commented 1 year ago

to be assigned to the project

tarekbouzayani commented 1 year ago

to be assigned to the project

tarekbouzayani commented 1 year ago

to be assigned to the GraphQL project

MadhuriWaghela commented 1 year ago

To be assigned to this project.

arun-esh commented 1 year ago

Please assign this to me as well.

JoshInnis commented 1 year ago

Hello everyone who was assigned today. Please follow the instructions laid out above and try to catch up to where the conversation is so far. We be moving forward with more discussions shortly, but for now try to follow what has been discussed so far, ask any questions you have or give your input to the discussion.

jvn1567 commented 1 year ago

Hello, looking forward to be a part of the project.

samsulai commented 1 year ago

to be assigned this project.

malzubairi commented 1 year ago

Hi, I have a question. is there any plan for the methodology that will be used to implement GraphQL?

JoshInnis commented 1 year ago

@malzubairi Do you mean software development methodology such as Agile?

JoshInnis commented 1 year ago

Hello everyone,

Sorry for the sudden change, but would you be able to join our discord server? After some discussion we determined that a GitHub issue isn't the best place for discussions and we needed a place for the team to hold conversations.

https://discord.gg/s6dpF6qZ

malzubairi commented 1 year ago

Yes, @JoshInnis

JoshInnis commented 1 year ago

Also, please comment here your preferred method of communication, discord or slack. if you think another method is better, please provide it

https://www.reddit.com/r/apacheage/comments/xlgueu/which_is_better_slack_or_discord_for_project/

aligbakhtiyar commented 1 year ago

Looking forward to being a part of this project!

aligbakhtiyar commented 1 year ago

This is my GitHub account: "https://github.com/aligbakhtiyar"

mohamedawnallah commented 1 year ago

Looking to contribute at the development for GraphQL Support of Apache AGE project!

ghost commented 1 year ago

to be assigned to the project.

DEENYUSUPH commented 1 year ago

Glad to be here !!!, ready to contribute to this project .

zeeshan457 commented 1 year ago

to be assigned to this projects, thanks.

JoshInnis commented 1 year ago

Welcome @zeeshan457 @DEENYUSUPH @Mohamed115ahmed @mhmdawnallah @aligbakhtiyar please join the discord channel where we will have team discussions going forward

https://discord.gg/s6dpF6qZ

JoshInnis commented 1 year ago

Also, it appears I have reached the limit that Github allows to assign to a single issue. Please join the Discord

sisi-siyuchen commented 1 year ago

I look forward to being involved in this project!

alykotb commented 1 year ago

Interested to be a part of this project.

alykotb commented 1 year ago

@JoshInnis when I try opening the discord link it tells me "the invitation may have been expired"

alykotb commented 1 year ago

@JoshInnis when I try opening the discord link it tells me "the invitation may have been expired"

alykotb commented 1 year ago

@JoshInnis when I try opening the discord link it tells me "the invitation may have been expired"

alykotb commented 1 year ago

@JoshInnis when I try opening the discord link it tells me "the invitation may have been expired"

alykotb commented 1 year ago

@JoshInnis when I try opening the discord link it tells me "the invitation may have been expired"

mohamedawnallah commented 1 year ago

@JoshInnis Discord Invitation link is expired. Could you please re-update it? Thanks for your time and consideration

JoshInnis commented 1 year ago

Ahh, sorry about that here is another link.

https://discord.gg/VD4drHrh

pragyan2002 commented 1 year ago

To be assigned to the project.

jasperblues commented 1 year ago

For the purpose of general utility and attracting users to AGE, look at what users will want to do with GraphQL. The majority will be building APIs choosing it as the favored option over a REST on account of all of GraphQL's benefits.

That means they won't just want graphQL. They'll need:

All of the above are typically provided by a middleware application layer. Simply have AGE expose a graphQL endpoint would deviate from this. Plus how would you specify which schema to use for which use-case(s)?

I strongly encourage for the graphQL layer to be implemented as part of the ecosystem products, outside of the main database. Doing this allows growing a bigger community around AGE with focused skillsets (same as we do with viewer) but this is not the main reason.

If we look at following Neo4j's example, they initially exposed a graphQL endpoint, then moved to having an ecosystem library, that allows integration into other middleware components - clients can use their preferred security, audit, etc.

In my view a good graphQL solution:

In the above openCYPHER is king because :

HackettJP commented 1 year ago

Looking forward to join the Apache Age project, thks

JavSCF commented 1 year ago

To be assigned to the project.

JavSCF commented 1 year ago

Are we trying something similar to this? Or did I understood it wrong?

https://neo4j.com/product/graphql-library/?utm_campaign=GraphQL+3.0.0&utm_content=UI&utm_medium=social&utm_source=LinkedIn&utm_tag=&utm_term=Image

https://neo4j.com/docs/graphql-manual/current/

iitaejeong commented 1 year ago

i think this post is quite good representation post for why replacing graphQL and graph database. 'https://medium.com/grandstack/five-common-graphql-problems-and-how-neo4j-graphql-aims-to-solve-them-e9a8999c8d43' above link of post was involved following. 1.Schema Duplication 2.Server/Client Data Mismatch 3.Superfluous Database Calls 4.Poor Performance 5.Boilerplate Overdose