Skip to content

Commit 996f9c1

Browse files
committed
editorial
1 parent 379c61f commit 996f9c1

File tree

2 files changed

+32
-28
lines changed

2 files changed

+32
-28
lines changed

grafast/website/news/2023-10-13-grafast-0.1.mdx

+15-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import styles from "@site/src/css/common.module.css";
1515

1616
<p className={styles.intro}>
1717

18-
Gra*fast* is finally here &mdash; a new holistic execution engine for GraphQL. It enables greater efficiency across the entire backend stack by leveraging the declarative nature of GraphQL to give your business logic a better understanding of everything it needs to do. It&lsquo;s backwards compatible, so you can adopt it incrementally within your existing schema and it&lsquo;s finally ready to try with [the `grafast` module on npm](https://www.npmjs.com/package/grafast); or check out [the source code on GitHub](https://github.com/graphile/crystal/tree/main/grafast/grafast)!
18+
Gra*fast* is finally here &mdash; a new holistic execution engine for GraphQL. It enables greater efficiency across the entire backend stack by leveraging the declarative nature of GraphQL to give your business logic a better understanding of everything it needs to do. Its backwards compatible, so you can adopt it incrementally within your existing schema and its finally ready to try with [the `grafast` module on npm](https://www.npmjs.com/package/grafast); or check out [the source code on GitHub](https://github.com/graphile/crystal/tree/main/grafast/grafast)!
1919

2020
</p>
2121

@@ -39,23 +39,23 @@ Gra*fast* is finally here &mdash; a new holistic execution engine for GraphQL. I
3939

4040
## Gra*fast* Working Group
4141

42-
There&lsquo;s still decisions to be made and edges to be smoothed before Gra*fast* can become a specification that can be implemented in any language. If the potential of this technology is interesting to you, please [join the Gra*fast* working group](https://github.com/grafast/wg) and get involved. We all deserve our future of easy GraphQL execution efficiency!
42+
Theres still decisions to be made and edges to be smoothed before Gra*fast* can become a specification that can be implemented in any language. If the potential of this technology is interesting to you, please [join the Gra*fast* working group](https://github.com/grafast/wg) and get involved. We all deserve our future of easy GraphQL execution efficiency!
4343

44-
<!--truncate-->
44+
<!-- truncate-->
4545

46-
If you don&lsquo;t have time to watch the video above, here&lsquo;s a little about Gra*fast*:
46+
If you dont have time to watch the video above, heres a little about Gra*fast*:
4747

48-
## &ldquo;GraphQL&lsquo;s execution model is wrong for most servers&rdquo;
48+
## &ldquo;GraphQLs execution model is wrong for most servers&rdquo;
4949

5050
GraphQL is a declarative language; the requests specify everything that the client is asking for up&ndash;front.
5151

5252
But the resolver&ndash;based execution model **_obfuscates_** this knowledge &mdash; when implemented naively, resolvers can very quickly result in serious performance issues; and even when implemented well they leave a lot to be desired.
5353

5454
DataLoader is one of the suggested approaches to solve the &ldquo;N+1 Problem&rdquo; but this is only the most egregious performance issue a GraphQL schema may face &mdash; there are plenty of related issues that can build up as your schemas and operations get more complex.
5555

56-
I set out not only to solve the well&ndash;known N+1 problem and the more subtle under&ndash; and over&ndash;fetching problems, but to help you achieve the most efficient execution for your GraphQL schema no matter what data sources you&lsquo;re working with! The solution? Leverage the declarative nature of GraphQL via a new general purpose query planner.
56+
I set out not only to solve the well&ndash;known N+1 problem and the more subtle under&ndash; and over&ndash;fetching problems, but to help you achieve the most efficient execution for your GraphQL schema no matter what data sources youre working with! The solution? Leverage the declarative nature of GraphQL via a new general purpose query planner.
5757

58-
## &ldquo;Step aside resolvers! There&lsquo;s a new way to execute GraphQL&rdquo;
58+
## &ldquo;Step aside resolvers! Theres a new way to execute GraphQL&rdquo;
5959

6060
<figure>
6161

@@ -70,7 +70,7 @@ Grafast calls &ldquo;plan resolvers&rdquo; to determine the requirements for eac
7070

7171
Gra*fast* has been designed from the ground up to give schema designers the tools they need to ensure their schemas are executing as efficiently as possible, whilst ensuring that writing their logic is still a pleasant experience. To achieve this, Gra*fast* favours a planning strategy which takes a holistic approach to understanding the incoming operation and unlocks the potential for significant optimizations: optimizations that are not achievable with a resolver&ndash;based execution model unless one puts in herculean effort (and a little sorcery 😉).
7272

73-
Gra*fast*, like GraphQL, is not specific to any particular technology stack, business logic shape or data storage layer. It doesn&lsquo;t care if you&lsquo;re using relational databases, document stores, ORMs, HTTP APIs, file systems or _[carrier pigeons](https://datatracker.ietf.org/doc/html/rfc1149)_. Any valid GraphQL schema can be implemented with Gra*fast*, and a Gra*fast* schema can query any data source, business logic or service.
73+
Gra*fast*, like GraphQL, is not specific to any particular technology stack, business logic shape or data storage layer. It doesnt care if youre using relational databases, document stores, ORMs, HTTP APIs, file systems or _[carrier pigeons](https://datatracker.ietf.org/doc/html/rfc1149)_. Any valid GraphQL schema can be implemented with Gra*fast*, and a Gra*fast* schema can query any data source, business logic or service.
7474

7575
Though it supports traditional resolvers, Gra*fast* encourages developers to use &ldquo;plan resolvers&rdquo;: small functions similar to resolvers but which describe the required data, rather than actually fetching it.
7676

@@ -102,14 +102,18 @@ This greater understanding of the needs of the GraphQL requests unlocks entire n
102102
GraphQL world.
103103
</strong>
104104
</p>
105-
&mdash; Sean Grove (@sgrove) <a href="https://twitter.com/sgrove/status/1696572548803162477?ref_src=twsrc%5Etfw">August 29, 2023</a>
106-
</blockquote> <script
105+
&mdash; Sean Grove (@sgrove){" "}
106+
<a href="https://twitter.com/sgrove/status/1696572548803162477?ref_src=twsrc%5Etfw">
107+
August 29, 2023
108+
</a>
109+
</blockquote>
110+
<script
107111
async
108112
src="https://platform.twitter.com/widgets.js"
109113
charset="utf-8"
110114
></script>
111115

112-
Gra*fast* already works and some of my [sponsors](https://graphile.org/sponsors) are already running it in production. You can try it out today by following the guide at [grafast.org](https://grafast.org). All that&lsquo;s left for me to say now is, if the potential of this new technology is interesting, then please:
116+
Gra*fast* already works and some of my [sponsors](https://graphile.org/sponsors) are already running it in production. You can try it out today by following the guide at [grafast.org](https://grafast.org). All thats left for me to say now is, if the potential of this new technology is interesting, then please:
113117

114118
## Help shape the future on 24th October and join the [Gra*fast* working group](https://github.com/grafast/wg)!
115119

grafast/website/news/2025-03-24-grafast-0.1-beta.21.mdx

+17-17
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ this release, 3 of these are now complete!
2626
- ✅🎉 **Eradicating eval - this release!**
2727
- 🤔🔜 Polymorphism
2828

29-
After 3 months of gruelling work, we're proud to announce that the third of
29+
After 3 months of gruelling work, were proud to announce that the third of
3030
these, eradicating eval, is now addressed with the launch of
3131
`[email protected]` (used as the core execution engine in
3232
@@ -37,9 +37,9 @@ these, eradicating eval, is now addressed with the launch of
3737

3838
Since the beginning, Gra*fast* has had the ability to add plan resolvers not
3939
just to fields, not just to arguments, but also to input object fields
40-
(including those within lists). This made Gra*fast*'s planning really ergonomic
40+
(including those within lists). This made Gra*fast*s planning really ergonomic
4141
for things like nested filters, which was great for PostGraphile! But it turns
42-
out it's really problematic for certain shapes of input — planning would put
42+
out its really problematic for certain shapes of input — planning would put
4343
constraints on the variables compatible with the plan, requiring potentially
4444
unlimited numbers of operation plans needing to be built for the same GraphQL
4545
document. Worse: for large input trees involving lists, the number of steps
@@ -48,7 +48,7 @@ excessive time.
4848

4949
One particular user example that could cause 4 minutes of planning time from
5050
just a 100kB input made it clear that we had overreached with using plan
51-
resolvers too deep into inputs; so we've scaled it back so that you can only add
51+
resolvers too deep into inputs; so weve scaled it back so that you can only add
5252
plan resolvers to fields and arguments, you can no longer attach `applyPlan` or
5353
`inputPlan` to input object fields. This was something that we used a lot
5454
internally (hence the huge time investment migrating away!), but very few people
@@ -62,55 +62,55 @@ plan, yielding a 200,000x speedup!
6262
### What does this mean for my codebase?
6363

6464
Hopefully good things! Please update to the latest `@beta` of all the
65-
PostGraphile and/or Gra*fast* related modules you're using (including plugins)
65+
PostGraphile and/or Gra*fast* related modules youre using (including plugins)
6666
and for most users everything should work as before, only better.
6767

68-
I've outlined some of the most common changes you may need to make below, but if
68+
Ive outlined some of the most common changes you may need to make below, but if
6969
you are impacted by any other changes, please ask for help in the chat — AFAIK
7070
most of the other things that have had significant changes are used by almost
71-
no-one except me, so it doesn't make sense for me to invest time documenting it
72-
here. If you're curious, many items are documented in both the changelogs and
71+
no-one except me, so it doesnt make sense for me to invest time documenting it
72+
here. If youre curious, many items are documented in both the changelogs and
7373
the pull requests where the changes occurred.
7474

7575
#### Change `fieldArgs.get` to `fieldArgs.getRaw`
7676

77-
Because we've removed `inputPlan`, the `fieldArgs.get(key)` method is no more;
77+
Because weve removed `inputPlan`, the `fieldArgs.get(key)` method is no more;
7878
instead use `fieldArgs.getRaw(key)` which is equivalent unless the inputs had
7979
plans (which they cannot any more).
8080

8181
#### Converting `applyPlan` and `inputPlan`
8282

8383
If your input object fields did have plan resolvers then instead of having
84-
Grafast automatically call them on each and every input field recursively at
84+
Gra*fast* automatically call them on each and every input field recursively at
8585
plan-time, we now have the `applyInput` and `bakedInput` steps that represent
8686
runtime application or transform of these inputs recursively via a single step
8787
in our plan diagram.
8888

89-
We've managed to make this new runtime system very similar in shape to the old
90-
plan-time system, so PostGraphile plugins don't need to change much — this was
91-
largely enabled by how closely we managed to get the Grafast plan syntax to the
89+
Weve managed to make this new runtime system very similar in shape to the old
90+
plan-time system, so PostGraphile plugins dont need to change much — this was
91+
largely enabled by how closely we managed to get the Gra*fast* plan syntax to the
9292
syntax of code you would normally write at runtime. The first change is to
9393
rename `applyPlan` to `apply`, and `inputPlan` to `baked`. From there, your code
9494
might just work straight away, or it might need some more small tweaks (e.g.
95-
`fieldArgs` is no longer present, it's been replaced with simply the runtime
95+
`fieldArgs` is no longer present, its been replaced with simply the runtime
9696
value of the current field).
9797

9898
#### No more `$step.eval*()`
9999

100100
The eval methods are now marked as internal so you will get TypeScript errors if
101101
you try and use them. They will likely be removed at some point after release,
102102
so you should be sure to migrate away from using them at your earliest
103-
opportunity. But you weren't using them anyway… right?
103+
opportunity. But you werent using them anyway… right?
104104

105105
#### ExecutableStep renamed to Step
106106

107107
This one is more cosmetic…
108108

109109
Since we no longer have plan resolvers deep in inputs, we no longer have the
110-
`ModifierStep` system that was used for managing them (it's been replaced with
110+
`ModifierStep` system that was used for managing them (its been replaced with
111111
`Modifier` which happens at runtime). Since we no longer have ModifierStep, we
112112
no longer need `BaseStep` to be separate from and inherited by `ExecutableStep`,
113-
so we've merged them. Since this is the base class for _all_ steps now, we've
113+
so weve merged them. Since this is the base class for _all_ steps now, weve
114114
renamed it to simply `Step`.
115115

116116
_We have kept an <code>ExecutableStep</code> export for backwards

0 commit comments

Comments
 (0)