Questions tagged [postgraphql]

A GraphQL API created by reflection over a PostgreSQL schema.

A GraphQL schema created by reflection over a PostgreSQL schema.

The strongly typed GraphQL data querying language is a revolutionary new way to interact with your server. Similar to how JSON very quickly overtook XML, GraphQL will likely take over REST. Why? Because GraphQL allows us to express our data in the exact same way we think about it.

With PostGraphQL, you can access the power of PostgreSQL through a well designed GraphQL server. PostGraphQL uses PostgreSQL reflection APIs to automatically detect primary keys, relationships, types, comments, and more providing a GraphQL server that is highly intelligent about your data.

PostGraphQL holds a fundamental belief that a well designed database schema should be all you need to serve well thought out APIs. PostgreSQL already has amazing user management and relationship infrastructure, why duplicate that logic in a custom API? PostGraphQL is likely to provide a more performant and standards compliant GraphQL API then any created in house. Focus on your product and let PostGraphQL manage how the data gets to the product.

17 questions
7
votes
2 answers

Filtering results in GraphQL using PostGraphile

I'm trying to wrap my head around GraphQL and I though using PostGraphile to easily and quickly map my PostgreSQL database and expose it using GraphQL. However, I've been stuck a long time on some things that in simple SQL would be a matter of…
Jonathan Perry
  • 2,953
  • 2
  • 44
  • 51
3
votes
1 answer

Get pgClient from postgraphile

I'm using the GraphQL API generator graphile as a middleware in an Express server. I would like to create a custom http endpoint (not graphql) that makes a raw sql query to the postgres database. Is there some way to get the pgPool/pgQuery from the…
Ivar
  • 1,208
  • 9
  • 15
2
votes
2 answers

Graphql mutation for a column of type UUID[]

I'm using a postgraphql autogenerated mutation to create a row with graphql in a in a postgres table that has a column of datatype UUID[]. However, there doesn't seem to be a way to save this UUID[] data with graphql? Is this a datatype that graphql…
Madeline
  • 59
  • 5
1
vote
0 answers

postgraphile condition filter failing

I'm working on migrating an GraphQL app from using Postgraphql 3.10 with a Postgresql version 9.6 database to using postgraphile version 4.7.0 and a Postgresql version 11 database. The graphql query below used to work in the old version but fail in…
ola
  • 129
  • 1
  • 10
1
vote
1 answer

GraphQL: Querying for a value from another table from a mutation

Let's say I have a table t1 that is foreign key'd to another table t2. For simplicity, t2 only has columns 'name' and 'id' which are both unique. I store the id in t1. My problem is I want to write a mutation where I know the name but I don't know…
1
vote
1 answer

Seamlessly migrate to Postgraphile (multiple ApolloClient instances)

Postgraphile seems very handy tool, but I've already have tens of queries and mutations on client and server side. Is there any way to integrate Postgraphile piece by piece, having my old GraphQL schema, described by hands working? So, now I have…
AntonAL
  • 16,692
  • 21
  • 80
  • 114
1
vote
1 answer

run postgraphile with npm

I'm working on a react app and using apollo and postgraphile for graphql. I currently have to have two terminal windows open, one running npm start for the react-dev server, and one running postgraphile -c 'postgresstring' for the postgraphile…
Sdarb
  • 173
  • 1
  • 10
1
vote
1 answer

PostgreSQL / PostGraphile row permissions not working

I'm trying to set up a GraphQL server with PostGraphile (formerly known as PostGraphQL) and I cannot get the row permissions working, meaning that I keep getting permission denied messages, despite it should work. Here is my schema: create function…
Tom
  • 2,688
  • 3
  • 29
  • 53
1
vote
0 answers

How can I use postgraphQL in conjunction with ReactQL

I'd like to use the postgraphQL library to auto-generate my graphql schema from a postgres database. I've used this in express apps previously, but I'm trying to make it work with the ReactQL starter kit. In an express app server file, I've…
bramb84
  • 355
  • 4
  • 14
1
vote
1 answer

Graphql date field type must be Output Type but got: undefined

I have a graphql server running with node/expres and ES6, I am trying to migrate to typescript, when I want to do graphql schema I have experiencing some problems with date types. I know that graphql does not contain a native date type, but in my…
xzegga
  • 3,051
  • 3
  • 25
  • 45
1
vote
1 answer

Trouble using Ember graphql-adapter and postgraphql

Ember and Graphql are both new to me and i'm trying to get my application working with Postgraphql without success I use Ember and https://github.com/alphasights/ember-graphql-adapter but the query made by ember-graphql-adapter doesn't match the…
vatourni
  • 117
  • 1
  • 6
0
votes
0 answers

Filter the connected list in Postgraphile

how can i set up filtering on top level in postgraphile i have such graphql query but if i filter data on bottom level i get a lot of unnecessary information and totalCount is not counted correctly. Can you tell me how to set up filtering in topTest…
0
votes
1 answer

408 timeout error with postgraphile on AWS elastic beanstalk

I'm running postgraphile and apollo to get data for my react app. I am using npm concurrently to run the react server and to run postgraph using the CLI including --cors flag. Everything works fine when i run the app locally. When I upload…
0
votes
1 answer

Postgraphile - "Query Root must be provided" error message

We have an existing postgresql database with data and we are experimenting with postgraphile as a graphql API. We are running into an error that is leaving us scratching our head. the server runs fine but we get the following: postgraphile -c…
Joseph
  • 351
  • 1
  • 6
  • 17
0
votes
1 answer

Why does Postgraphile's Connection type allow NULLs in its nodes list?

If I have table X, why does the Postgraphile-generated schema for XConnection allow nulls in the returned list? type XConnection { nodes: [X]! } instead of type XConnection { nodes: [X!]! } I could not come up with examples where either the allXs…
DeD
  • 23
  • 4
1
2