How do you get aws appsync to pick up relations when adding Aurora as graphql datasource - graphql

Using add-graphql-datasource, appsync is supposed to generate a graphql endpoint based on the existing structure of an aurora mysql serverless database. The database already has data in it.
Relational Databases Section at
https://aws-amplify.github.io/docs/cli-toolchain/graphql
However, the generated endpoint just has flat representations of the data - none of the relations that exist in database.
How can you use add-graphql-datasource to generate the relations as well?

As of writing, the add-graphql-datasource command does not support auto-generating logic for relations. You can use the add-graphql-datasource command to get started and then write your own resolver logic to implement the relations.

Related

How to update data in supabase having one to many relation?

I am working on a smaller project. I have two tables e.g. properties and agents. One property can have many agents. How can I update data in both tables using one query?
Here is the link to update data in postgres How I can update one to many relation in Postgres?
Supabase uses postgrest under the hood for the RESTful api, currently the suggested solution there is to write an rpc() function and call that.
Alternatively, since Supabase is just PostgreSQL, you always have the option of connecting directly using any postgres client and using the postgres solution you mentioned in your question.

Direct connection queries with groovy and dynamoDB

im working with Quantrix, a java based modeling software.
I want to query from a NoSQL Database, DynamoDB to be precise. In Quantrix i can create a direct connection with a JDBC Driver.
I wonder wheather its possible to query directly with the script language of Quantrix (Groovy) from DynamoDB?
So is it possible to build a direct connection to DynamoDB with Groovy?
All the Best
Hector

How to migrate from one backing store to another

I need to figure out a way to migrate our Javers audit data from DocumentDB to another independent repository than our domain data.
Does javers currently have any mechanism we can use to take our existing data and insert it properly into a second DB without having to manually map the data?
There is no migration tool. There are two javers' collections in MongoDB: jv_snapshots and jv_head_id, it's easy to copy them manually.

Is there a way Hasura can generate tables automatically using a schema.graphql file similar to keystonejs?

I'm wondering if there's a way where if given a schema.graphql file Hasura can create the required tables for the GraphQL endpoint? I'm looking for something similar to what keystonejs provides.
My current understanding is
Hasura
Tables --> GraphQL
KeystoneJS
Schema --> GraphQL (With automatic creation of tables)
You can use graphql-to-sql, here's an example (click "run"):
https://repl.it/repls/DangerousOutlyingSolution#index.js
I could not find anything about seeding or migrating in existing GraphQL file.
Maybe because they only operate on a PostgreSQL DB? You can just go a little more low level and seed the underlying PostgreSQL DB with some DDL.

Which database server prisma based on?

I would like to know about Prisma more detail.
First of all, I would like to know what database Prisma based on.
Is it RDBMS or Nosql?
Also, this command create new database server:
prima deploy
I would like to now if this database is based on RDBMS, or NoSql.
And how can I access to this database without graphql, such as phpmyadmin or mongobooster?
A generally good resource to find out more about Prisma in detail is the documentation: https://www.prisma.io/docs. Specifically, this article shares a high-level overview of what Prisma is and does.
What database is Prisma based on?
Prisma is not based on a specific database. Instead, you can use Prisma Connectors to connect your database to the Prisma layer, to obtain a GraphQL API. Currently supported databases are MySQL and Postgres and connectors for MongoDB and Elastic Search are currently in development, and more will follow.
prisma deploy
prisma deploy does not create a new database server. You can use prisma deploy to deploy a Prisma API to a Prisma Server, which is connected to a database (as mentioned above).
For quick development, free development Prisma servers are available in Prisma Cloud. They can be deployed to without setting up a Prisma server or database first.
I assume that you are deploying against this free development server. In this case, you have no direct access to the database.
Accessing the Database
Depending on the underlying database, you can use tools like Sequel Pro (for MySQL), pgAdmin (for PostgreSQL) etc.
You can also use the databrowser from Prisma Cloud to explore and interact with your data, independently from the underlying data store.

Resources