Skip to content

Commit

Permalink
sql on custom-queries.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jemgillam committed Feb 17, 2025
1 parent 0fcbc1b commit 46f2411
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
9 changes: 7 additions & 2 deletions postgraphile/website/postgraphile/custom-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ obey the following rules:
For example the functions:

```sql
CREATE FUNCTION my_function(a int, b int) RETURNS int AS $$ … $$ LANGUAGE sql IMMUTABLE;
CREATE FUNCTION my_other_function(a int, b int) RETURNS my_table AS $$ … $$ LANGUAGE sql STABLE;
create function my_function(a int, b int) returns int as $$
$$ language sql immutable;

create function my_other_function(a int, b int) returns my_table as $$
$$ language sql stable;
```

could be queried in GraphQL like this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ obey the following rules:
For example the functions:

```sql
CREATE FUNCTION my_function(a int, b int) RETURNS int AS $$ … $$ LANGUAGE sql IMMUTABLE;
CREATE FUNCTION my_other_function(a int, b int) RETURNS my_table AS $$ … $$ LANGUAGE sql STABLE;
create function my_function(a int, b int) returns int as $$
$$ language sql immutable;

create function my_other_function(a int, b int) returns my_table as $$
$$ language sql stable;
```

could be queried in GraphQL like this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ obey the following rules:
For example the functions:

```sql
CREATE FUNCTION my_function(a int, b int) RETURNS int AS $$ … $$ LANGUAGE sql IMMUTABLE;
CREATE FUNCTION my_other_function(a int, b int) RETURNS my_table AS $$ … $$ LANGUAGE sql STABLE;
create function my_function(a int, b int) returns int as $$
$$ language sql immutable;

create function my_other_function(a int, b int) returns my_table as $$
$$ language sql stable;
```

could be queried in GraphQL like this:
Expand Down

0 comments on commit 46f2411

Please sign in to comment.