A GraphQL API created by reflection over a PostgreSQL schema. Formerly PostGraphQL.
Questions tagged [postgraphile]
118 questions
1
vote
0 answers
Cannot find module "postgraphile plugin upload field "
i installed postgraphile-plugin-upload-field
npm i graphile-contrib/postgraphile-plugin-upload-field
then
postgraphile -c 'postgres://postgres:mysecretpass@192.168.38.4:5432/gimapp' --cors -p 5001 --enhance-graphiql --host "0.0.0.0" -s…

Mustafa Ülker
- 17
- 5
1
vote
0 answers
How do you configure simple-subscriptions to run using Postgraphile CLI?
I would like to add subscriptions into a react project I have which currently references graphql using the port 5000 endpoint created by running postgraphile. I start this using the command line startup of globally installed (via npm -g…

Mr Davros
- 100
- 10
1
vote
1 answer
graphql-shield as 'makeProcessSchemaPlugin' in Postgraphile
Tried postgrphile example but not sure where mistake were done?
I am trying to implement graphql-shield as a plugin
middlewarePlugin = makeProcessSchemaPlugin((schema: typeof GraphQLSchema) => {
return applyMiddleware(schema,…

galvakojis
- 408
- 1
- 5
- 19
1
vote
0 answers
Graphql Conditional variables in Queries
I would like to have the variables I do not use be completely omitted to avoid errors like "Variable "$eventId" got invalid value ""; Int cannot represent non-integer value: "
Take this query for example:
//gql``
query($orderBy: [AwardsOrderBy!],…

Jamie Hutber
- 26,790
- 46
- 179
- 291
1
vote
0 answers
Backend can't query dockerized postgresql
I'm running my containers via a docker compose file. They are in the same network and I can ping from my backend container to my database container. I use the database name as the hostname in the connection string and it doesn't bring any errors…

Kustemit
- 105
- 1
- 10
1
vote
0 answers
postgraphile - function to add structured data as field on mutation
I'd like to do the simplest possible thing to add structured data to a postgraphile mutation.
I have a simple example table:
> \d test1.my_table …

Hoopes
- 3,943
- 4
- 44
- 60
1
vote
0 answers
Returning deleted row in a trigger
I'm struggling to return anything inside an if statement which has delete before returning. I want to return the old row which was essentially deleted. Any help?
It returns the new row without problem since it's only updated, but I can't return the…

Kustemit
- 105
- 1
- 10
1
vote
0 answers
ra-postgraphile: Intercept the error api response
I am using ra-postgraphile as dataprovider for react-admin project and i need to intercept the error api response. Is there any error object or function available for that? if yes, Can I get a documentation.
Also posted an issue in ra-postgraphile…

unni panicker
- 11
- 2
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
0 answers
PostGraphile subscription on totalCount with filter ignores decrements
Goal:
Subscribe to a count of Products (from a Postgres DB) scheduled for today with state=NEW
The code:
subscription getTotalNewProducts {
orderProducts(
condition: {state: "NEW"},
filter: {scheduledDate: {greaterThanOrEqualTo:…

nozem
- 467
- 8
- 10
1
vote
1 answer
Best practice to handle column level select grants in PostGraphile
PostGraphile does NOT recommend column-level SELECT grants, instead recommends to
split your concerns into multiple tables and use the
one-to-one relationship feature to link them.
Now I want my users table to have a role field that can be…

farshad
- 189
- 1
- 1
- 6
1
vote
1 answer
Extending a GraphQL Filter Definition
I have extended my graphql schema to add a totals resolver, but I can't seem to extend the filter to filter on this field. I can't figure out what can be wrong as it seems very simple, so maybe it's not supported? I am using Postgraphile with the…

Galen Howlett
- 530
- 4
- 12
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…

Ian Kirkpatrick
- 33
- 7
1
vote
1 answer
GraphQL Cannot read property 'query' of undefined
I cannot work out why I would get a query undefined when I know my definitions are correct. graphiQL is picking up my schemes without problems:
Auto complete works fine:
After hitting ctrl+enter all the fields are entered, see above.
Then I…

Jamie Hutber
- 26,790
- 46
- 179
- 291
1
vote
2 answers
Is it possible to use postgraphile with .net core?
I am trying to create an angular project with .net core 2.1 with GraphQL library. I am totaly new in PostgresSQL, GraphQL & PostGraphile. So, just want to know is it possible to use PostGraphile with my angular .net core project. I have added a…

Shell
- 6,818
- 11
- 39
- 70