Comments (8)
(perhaps a more general solution, in addition to handling citext
, would be to allow directives in comments to change the field type as well as the name? that way if we have multiple datatypes that are treated as Opaque by default, we can name them differently and configure a client to map to javascript values in a separate way for each one)
from pg_graphql.
Hey @olirice , I would love to work on this issue. Can you assign this to me??
from pg_graphql.
I agree that citext
would be better treated as a String
. citext
is quite common so if it can be supported easily we'll do it
I'd like to hold off on a generic solution for now, but your comment directive idea sounds pretty solid too
from pg_graphql.
Hi @olirice , so sorry couldn't look up to this issue due to my placement season.
I tried to find citext
inside code see but couldn't find it.
I am doing this to trace where exactly unwanted conversion keeps happening.
Can you help?
Also is there any documentation that can help me understand codebase more deeply?
Thanks!!
from pg_graphql.
the best place to start to get onboarded would be the resolve function from there you can follow the whole lifecycle of a request from user input to the response.
The basic steps are
- Load the sql schema (line 48-49)
- Parse the query
Line 14 in 4ac0ca1
- Resolve selections
Line 127 in 4ac0ca1
- Pass the query selections to the relevant builder (Node/Connection/__Type) e.g. top level selections
- Compare the GraphQL schema against the query, parsing arguments, fields etc into a Builder object that contains all the relevant information to transpile a SQL query
Line 1359 in 4ac0ca1
- compile the builder to a SQL statement
Line 1171 in 4ac0ca1
- Execute the SQL statement
Line 72 in 4ac0ca1
Line 212 in 4ac0ca1
- Return the result
Line 272 in 4ac0ca1
from pg_graphql.
citext
will not be referenced anywhere in the code base. You'd have to identify it on the sql Context and manipulate the GraphQL type that it turns into here
Lines 1624 to 1659 in 4ac0ca1
from pg_graphql.
Just ran into this issue -- had a custom text-derived type which cannot be filtered down anymore due to Opaque not having an in
operator.
@olirice is there any way to denote that a particular user-defined type should be treated as another postgres type during Filtering operations?
In this case, I'd like to tell pg_graphql "hey, you're safe to treat this like you would a text type"
EDIT: this may be what @yatendra2001 is suggesting
EDIT 2: #402 might solve my use case, as mentioned above. Excited for it!
from pg_graphql.
is there any way to denote that a particular user-defined type should be treated as another postgres type during Filtering operations?
Not currently, and the domains PR wouldn't resolve that problem. Adding support for citext
-> String
explicitly #418
from pg_graphql.
Related Issues (20)
- User provided default is ignored HOT 2
- Function returning table from non `search_path` schema HOT 2
- Function with text default argument chokes graphiql HOT 1
- Multiple choices enum is not correctly reflected in filters HOT 4
- Support filtering on array column types HOT 3
- Typo in ArgsIterator HOT 1
- #454 is incomplete HOT 1
- Stored Procedures are not being displayed as GraphQL Mutations. HOT 4
- Some feature requests HOT 4
- Extend inflect_names usage HOT 6
- Conditionally disable Relay wraparound HOT 2
- Conditionally exclude fields from Query HOT 5
- How to work with joins that don't rely on foreign keys (unique) HOT 3
- Function returns set-of view fails introspection if view does not define primary key HOT 8
- implement missing GraphQL spec validations
- functions in public schema are not exposed via graphql HOT 4
- Return json/jsonb columns as json in response instead of string HOT 1
- Result::unwrap() on an Err value: PoisonError { .. } HOT 6
- Introspection Timeout after upgrade from 1.2 to 1.5 HOT 12
- RLS without Supabase HOT 5
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_graphql.