Comments (7)
You’re almost there; change the ’categoria’
to ’@foreignFieldName products’
(but watch out for the smart quotes my phone added - sorry)
from pg-simplify-inflector.
I have restarted the server and works.
Thanks!
from pg-simplify-inflector.
As a shortcut for single-key relations? That seems a reasonable idea, but what would we call the forward relation part on the same column? Maybe the smart comment should be slightly different, e.g. “relationFieldName” / “relationForeignFieldName”?
from pg-simplify-inflector.
I need to add a smart comment to use "products" instead of "productsByCategoryId" in the relationship one to many. Where I should add that comment? directly in postgres?
I have two tables:
products
- name
- categoryId
categories
- name
I am trying this:
COMMENT ON CONSTRAINT "productos_categoriaId_fkey" on productos is 'categoria' .
but not works.
from pg-simplify-inflector.
Yes, I have tried that, but the response is always the same and don't works.
This is the query that I run in pg Admin.
And this is my query in Graphiql.
from pg-simplify-inflector.
In the second query you’re querying productosCategorias (not productos) so I’d expect constraint named something like productos_categorias_categoryId_fkey
from pg-simplify-inflector.
But there is not constraint on productosCategorias table, because the fk is on productos table.
from pg-simplify-inflector.
Related Issues (20)
- Adding list suffix results in incorrect name HOT 4
- Incompatible with --simple-collections (both|only) HOT 4
- Supporting "both" / "only" option for graceful migration HOT 2
- Consider making primary key fetchers/updaters shorter HOT 4
- Typescript Support HOT 2
- Using pgSimpleCollections: 'only' without pgOmitListSuffix: true will throw error HOT 4
- Using alongside postgraphile-plugin-connection-filter HOT 3
- Replace pluralize with a version that only pluralizes the end word HOT 1
- Error: Cannot find module '@graphile-contrib/pg-simplify-inflector' HOT 1
- Change log very out of date HOT 2
- npm install -g for CLI use HOT 5
- Lacking Typescript declarations HOT 5
- Document `foreignSimpleFieldName` HOT 3
- Field name simplification broken after renaming with Smart Tag HOT 7
- Primary keys that are also foreign keys not simplified HOT 3
- Incompatibility/warning messages when installing at a Docker container HOT 1
- Import problems from ESM to this module HOT 10
- mutationFunctionResultFieldName: () => 'result' HOT 1
- Handle issues with plural === singular HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg-simplify-inflector.