Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for UDFs as GraphQL queries/mutations #393

Merged
merged 102 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
8f6210d
add udfs to sql context
imor Jul 24, 2023
99ec433
expose UDFs in introspection schema
imor Jul 25, 2023
728bdb1
only use VOLATILE functions in mutation
imor Jul 26, 2023
17b9645
simple function calls working on mutation object
imor Jul 27, 2023
638a3cd
remove commented out code
imor Jul 27, 2023
ce8bdce
add a test to call a function on muation
imor Jul 27, 2023
c7f6eae
make volatile explicit
imor Jul 27, 2023
a84f1de
add another test
imor Jul 27, 2023
2dbeb23
add bigints test
imor Jul 27, 2023
cfcf0c3
add bools test
imor Jul 27, 2023
1d0f1f3
add reals test
imor Jul 27, 2023
0ffe4ca
add double precision test
imor Jul 27, 2023
3494614
add numerics test
imor Jul 27, 2023
3c1d7ef
add uuid test
imor Jul 27, 2023
1747b8a
add text test
imor Jul 27, 2023
86127b9
fix eof
imor Jul 27, 2023
9cd153c
add date test
imor Jul 28, 2023
5f31923
add time test
imor Jul 28, 2023
5d9f0ed
add time with time zone test
imor Jul 28, 2023
bc69df4
add timestamp test
imor Jul 28, 2023
a0b0c1d
add timestamptz test and using fixed timezone
imor Jul 28, 2023
c661f69
add json test
imor Jul 28, 2023
74ec2b5
add jsonb test
imor Jul 28, 2023
dc7cb45
add failing char(x) test
imor Jul 28, 2023
1a599b0
fix failing char(x) test
imor Jul 28, 2023
a1c5cdc
add varchar(x) test
imor Jul 28, 2023
174fd69
extract a function for function fields
imor Jul 28, 2023
0c870b0
expose stable/immutable funcs on query type
imor Jul 28, 2023
be4e577
Merge branch 'master' into expose_udfs
imor Jul 31, 2023
8d7aec5
Merge branch 'master' into expose_udfs
imor Aug 1, 2023
490f39d
add test for a func returning a composite type
imor Aug 3, 2023
eca9a49
Merge branch 'master' into expose_udfs
imor Aug 3, 2023
c2136d4
correct a test case
imor Aug 4, 2023
93376c4
add more tests
imor Aug 4, 2023
730d9ac
add __typename to test
imor Aug 4, 2023
0228ba0
support for set returning functions
imor Aug 15, 2023
93fbca5
add support for args in set returning functions
imor Aug 15, 2023
486b6a1
mix function and connection info args
imor Aug 15, 2023
65567ec
add totalCount field
imor Aug 15, 2023
52750af
fix eof
imor Aug 15, 2023
35c13e5
fix eof
imor Aug 15, 2023
79847aa
function with args clashes not exposed
imor Aug 15, 2023
6319b28
Merge branch 'master' into expose_udfs
imor Aug 31, 2023
75e3e5c
read functions in sql context only once
imor Aug 31, 2023
f7284e6
fix mutation returning null in schema if only functions in schema
imor Sep 1, 2023
0f45530
update function_calls test to include schema queries
imor Sep 1, 2023
2b12065
add a test for functions returning record (not fully supported yet)
imor Sep 1, 2023
e4685d7
fix trailing whitespace
imor Sep 1, 2023
e2278a5
add tests for overloaded functions (not supported yet)
imor Sep 1, 2023
2e5e947
move unsupported test into a separate file
imor Sep 1, 2023
cc2ca98
fix eof & trailing whitespace
imor Sep 1, 2023
31a8db8
handle name clash between <table>Collection and function
imor Sep 2, 2023
be1b817
add another test in function_calls_unsupported
imor Sep 2, 2023
62dd536
add variadic function tests
imor Sep 2, 2023
d0100a3
add void returning func to unsupported tests
imor Sep 2, 2023
e2a26c6
remove clashing name from unsupported tests
imor Sep 2, 2023
3b6423c
add some docs
imor Sep 2, 2023
ddd95b3
accept args for functions returning a single table row
imor Sep 3, 2023
3f8bc91
add description tests
imor Sep 3, 2023
3bb21aa
add name directive tests
imor Sep 3, 2023
52d8b82
add inflect names test on function names
imor Sep 3, 2023
7387e4b
fix eof
imor Sep 3, 2023
2dd5c9b
add support for function arg inflection
imor Sep 3, 2023
c796182
add another function arg inflection test
imor Sep 3, 2023
ee96cd3
add more examples to docs
imor Sep 3, 2023
57105b4
add unsupported functions to docs
imor Sep 3, 2023
8c0cf61
correct a comment
imor Sep 3, 2023
22cd426
fix eof
imor Sep 3, 2023
7fe4213
add a note in docs
imor Sep 3, 2023
b6420fc
fix examples in docs
imor Sep 4, 2023
7372c74
clarify a sentence
imor Sep 4, 2023
59d77fa
correct UDF call return types for some numeric and json types
imor Sep 6, 2023
e6d5dcb
use quoted names for identifiers in docs to avoid inflection errors
imor Sep 6, 2023
02f79cc
remove invalid query in test
imor Sep 6, 2023
384ce3f
updated unsupported function types in docs
imor Sep 6, 2023
72c2c67
filter out unsupported functions
imor Sep 6, 2023
4ced695
filter out more unsupported functions
imor Sep 6, 2023
4b9b083
update unsupported functions in docs
imor Sep 6, 2023
320379b
update out file
imor Sep 6, 2023
3953c35
correct docs and tests
imor Sep 6, 2023
778c72f
filter out functions returning record types
imor Sep 6, 2023
00e6547
filter out overloaded functions
imor Sep 6, 2023
05730d6
filter out functions with nameless args
imor Sep 6, 2023
5b8cb79
compute function_name_to_count only once
imor Sep 6, 2023
67d0eed
filter out functions with default args
imor Sep 6, 2023
717ad18
update comments in unsupported functions tests
imor Sep 6, 2023
a99f9a3
filter out functions accepting or returning array types
imor Sep 6, 2023
7216d75
fix trailing whitespace
imor Sep 6, 2023
07afef4
fix a function not being excluded in a test
imor Sep 14, 2023
3ff3598
fix a bug in which Node returning function didn't handle nulls properly
imor Sep 14, 2023
88b1bb5
remove a stray comment
imor Sep 15, 2023
4a36544
filter function accessibility by role on execute privilege + test
olirice Sep 19, 2023
63484ea
Merge pull request #1 from supabase/or/function-execute-test
imor Sep 20, 2023
4c0bcfa
Revert "remove a stray comment"
imor Sep 25, 2023
4320620
Revert "fix a bug in which Node returning function didn't handle null…
imor Sep 25, 2023
13bd773
Merge branch 'master' into expose_udfs
imor Sep 25, 2023
27ea219
bump pgrx version to 0.10.2
imor Sep 25, 2023
ab54284
Merge branch 'bump_pgrx_version' into expose_udfs
imor Sep 25, 2023
4e0f471
return null root object install of all null fields when a function re…
imor Sep 26, 2023
11690c8
add QueryType and MutationType to function docs
olirice Sep 26, 2023
e823810
test arg and return types not on search path are filtered out
olirice Sep 26, 2023
fbdcb2b
update changelog
olirice Sep 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
package_name:
- pg-graphql
pgrx_version:
- 0.10.1
- 0.10.2
postgres: [14, 15, 16]
box:
- { runner: ubuntu-20.04, arch: amd64 }
Expand Down
70 changes: 18 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pg16 = ["pgrx/pg16", "pgrx-tests/pg16"]
pg_test = []

[dependencies]
pgrx = "=0.10.1"
pgrx = "=0.10.2"
graphql-parser = "0.4"
serde = { version = "1.0", features = ["rc"] }
serde_json = "1.0"
Expand All @@ -28,7 +28,7 @@ lazy_static = "1"
bimap = { version = "0.6.3", features = ["serde"] }

[dev-dependencies]
pgrx-tests = "=0.10.1"
pgrx-tests = "=0.10.2"

[profile.dev]
panic = "unwind"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/db/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN \
cargo --version

# PGRX
RUN cargo install cargo-pgrx --version 0.10.1 --locked
RUN cargo install cargo-pgrx --version 0.10.2 --locked

RUN cargo pgrx init --pg${PG_MAJOR} $(which pg_config)

Expand Down
5 changes: 4 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@
- bugfix: foreign keys on non-null columns produce non-null GraphQL relationships

## 1.3.0
- rename enum variants with comment directive `@graphql({"mappings": "sql-value": "graphql_value""})`
- feature: rename enum variants with comment directive `@graphql({"mappings": "sql-value": "graphql_value""})`
- bugfix: query with more than 50 fields fails
- bugfix: @skip and @include directives missing from introspection schema
- feature: Support for `and`, `or` and `not` operators in filters
- bugfix: queries failed to run if the database was in read-only replica mode

## master
- feature: citext type represented as a GraphQL String
- feature: Support for Postgres 16
- feature: Support for user defined function
Loading
Loading