Skip to content

Commit

Permalink
Rename DataPlanner to Grafast
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Sep 11, 2022
1 parent 16afddc commit 5a6b0e7
Show file tree
Hide file tree
Showing 250 changed files with 355 additions and 355 deletions.
2 changes: 1 addition & 1 deletion NEW_EXECUTOR.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ NEXT UP:
- LayerPlan should take charge of deduplication
- LayerPlan should take charge of tree shaking (via OutputPlan too)

- Consider splitting OperationPlan into GraphQLOperationPlan and DataPlannerCore
- Consider splitting OperationPlan into GraphQLOperationPlan and GrafastCore
(where core contains the steps/deduplication/etc and GraphQLOperationPlan
deals with GraphQL selection sets/etc)
- If we do this, consider renaming OutputPlan to GraphQLOutputPlan
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ yarn postgraphile -e -c postgres:///your_db_here
This should run PostGraphile [at http://localhost:5678](http://localhost:5678).
It may take a good few seconds to load GraphiQL the first time... I should look
into that. If you go to `Panels > Explain` then when you run queries you'll be
able to see the DataPlanner query plan (and the SQL queries) in the resizeable
able to see the Grafast query plan (and the SQL queries) in the resizeable
panel at the bottom.

Should you wish to get your feet a little wetter, have a look at
Expand Down Expand Up @@ -67,11 +67,11 @@ need your feedback!

At Graphile we love GraphQL so much we named ourself for our love of it! This
repository houses many of the Graphile packages that relate to GraphQL; the two
headline projects are **DataPlanner** and **PostGraphile** but there's many
headline projects are **Grafast** and **PostGraphile** but there's many
other packages, a fair few of which can be used independently - see below for
more details.

**[DataPlanner][dataplanner]**: A cutting-edge planning and execution engine for
**[Grafast][grafast]**: A cutting-edge planning and execution engine for
GraphQL.js ─ write your GraphQL schema with "plans" rather than "resolvers" and
our intelligent engine can optimize execution for incredible performance and
efficiency gains despite very attractive developer ergonomics. With batching
Expand All @@ -91,7 +91,7 @@ you then manage yourself.

Here's a rough breakdown of the main packages:

- **[dataplanner][]** - standalone cutting-edge planning and execution engine
- **[grafast][]** - standalone cutting-edge planning and execution engine
for GraphQL; see above for full description.
- **[@dataplan/pg][]** - plan classes for interacting with PostgreSQL
- **[@dataplan/json][]** - plan classes for encoding/decoding JSON
Expand Down Expand Up @@ -204,7 +204,7 @@ If the above succeeds, you're good to go! If not, please try again after running
If you want to work in a Docker environment you can follow
[the instructions on the wiki](https://github.com/graphile/graphile-build/wiki/Development-with-docker-compose).

[dataplanner]: packages/dataplanner/
[grafast]: packages/grafast/
[@dataplan/pg]: packages/dataplan-pg/
[@dataplan/json]: packages/dataplan-json/
[graphile-export]: packages/graphile-export/
Expand Down
6 changes: 3 additions & 3 deletions packages/dataplan-json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
[![GitHub Sponsors](https://img.shields.io/github/sponsors/benjie?color=ff69b4&label=github%20sponsors)](https://github.com/sponsors/benjie)
[![Patreon sponsor button](https://img.shields.io/badge/sponsor-via%20Patreon-orange.svg)](https://patreon.com/benjie)
[![Discord chat room](https://img.shields.io/discord/489127045289476126.svg)](http://discord.gg/graphile)
[![Follow](https://img.shields.io/badge/twitter-@DataPlannerHQ-blueviolet.svg)](https://twitter.com/DataPlannerHQ)
[![Follow](https://img.shields.io/badge/twitter-@GrafastHQ-blueviolet.svg)](https://twitter.com/GrafastHQ)

_**A cutting-edge planning and execution engine for GraphQL**_

[DataPlanner][dataplanner] understands GraphQL and (with your help) it
[Grafast][grafast] understands GraphQL and (with your help) it
understands your business logic; this allows it to orchestrate a GraphQL
request's data requirements in an extremely efficient manner, leading to
excellent performance, reduced server load, and happier customers.
Expand Down Expand Up @@ -44,4 +44,4 @@ And please give some love to our featured sponsors 🤩:

<!-- SPONSORS_END -->

[dataplanner]: packages/dataplanner/
[grafast]: packages/grafast/
2 changes: 1 addition & 1 deletion packages/dataplan-json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"node": ">=14.17"
},
"peerDependencies": {
"dataplanner": "workspace:^",
"grafast": "workspace:^",
"graphql": "*"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-json/src/steps/jsonParse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {
AccessStep,
CrystalResultsList,
CrystalValuesList,
} from "dataplanner";
import { access, ExecutableStep } from "dataplanner";
} from "grafast";
import { access, ExecutableStep } from "grafast";

export type JSONValue =
| string
Expand Down
2 changes: 1 addition & 1 deletion packages/dataplan-json/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"include": ["src"],
"references": [
{ "path": "../dataplanner" },
{ "path": "../grafast" },
{ "path": "../jest-serializer-simple" }
]
}
6 changes: 3 additions & 3 deletions packages/dataplan-pg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
[![GitHub Sponsors](https://img.shields.io/github/sponsors/benjie?color=ff69b4&label=github%20sponsors)](https://github.com/sponsors/benjie)
[![Patreon sponsor button](https://img.shields.io/badge/sponsor-via%20Patreon-orange.svg)](https://patreon.com/benjie)
[![Discord chat room](https://img.shields.io/discord/489127045289476126.svg)](http://discord.gg/graphile)
[![Follow](https://img.shields.io/badge/twitter-@DataPlannerHQ-blueviolet.svg)](https://twitter.com/DataPlannerHQ)
[![Follow](https://img.shields.io/badge/twitter-@GrafastHQ-blueviolet.svg)](https://twitter.com/GrafastHQ)

_**A cutting-edge planning and execution engine for GraphQL**_

[DataPlanner][dataplanner] understands GraphQL and (with your help) it
[Grafast][grafast] understands GraphQL and (with your help) it
understands your business logic; this allows it to orchestrate a GraphQL
request's data requirements in an extremely efficient manner, leading to
excellent performance, reduced server load, and happier customers.
Expand Down Expand Up @@ -44,4 +44,4 @@ And please give some love to our featured sponsors 🤩:

<!-- SPONSORS_END -->

[dataplanner]: packages/dataplanner/
[grafast]: packages/grafast/
8 changes: 4 additions & 4 deletions packages/dataplan-pg/__tests__/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
*/

import { makeNodePostgresWithPgClient } from "@dataplan/pg/adaptors/node-postgres";
import type { BaseGraphQLContext } from "dataplanner";
import type { BaseGraphQLContext } from "grafast";
import {
__TrackedObjectStep,
__ValueStep,
dataplannerGraphql,
grafastGraphql,
isAsyncIterable,
stripAnsi,
} from "dataplanner";
} from "grafast";
import type { AsyncExecutionResult, ExecutionResult } from "graphql";
import { resolve } from "path";
import { Pool } from "pg";
Expand Down Expand Up @@ -160,7 +160,7 @@ async function main() {
console.log();
console.log();
console.log();
const result = await dataplannerGraphql(
const result = await grafastGraphql(
{
schema,
source,
Expand Down
12 changes: 6 additions & 6 deletions packages/dataplan-pg/__tests__/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ if (process.env.DEBUG) {
jest.setTimeout(30000);
}

import type { BaseGraphQLContext } from "dataplanner";
import type { BaseGraphQLContext } from "grafast";
import {
$$bypassGraphQL,
execute as dataplannerExecute,
execute as grafastExecute,
stringifyPayload,
subscribe as dataplannerSubscribe,
} from "dataplanner";
subscribe as grafastSubscribe,
} from "grafast";
import { promises as fsp } from "fs";
import type {
AsyncExecutionResult,
Expand Down Expand Up @@ -417,8 +417,8 @@ export async function runTestQuery(
);
}

const execute = dataplannerExecute;
const subscribe = dataplannerSubscribe;
const execute = grafastExecute;
const subscribe = grafastSubscribe;

const result =
operationType === "subscription"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO: move this test to the dataplanner package
# TODO: move this test to the grafast package
## expect(data).toBe(null);
## expect(errors).toHaveLength(1);
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO: move this test to the dataplanner package
# TODO: move this test to the grafast package
## expect(data).toBe(null);
## expect(errors).toHaveLength(1);
{
Expand Down
2 changes: 1 addition & 1 deletion packages/dataplan-pg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"dependencies": {
"@graphile/lru": "4.6.0-alpha.0",
"@types/node": "^16.11.15",
"dataplanner": "workspace:^",
"grafast": "workspace:^",
"pg-sql2": "workspace:^",
"postgres-range": "^1.1.1",
"tslib": "^2.4.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/PgSubscriber.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CrystalSubscriber, Deferred } from "dataplanner";
import { defer } from "dataplanner";
import type { CrystalSubscriber, Deferred } from "grafast";
import { defer } from "grafast";
import EventEmitter from "events";
import type { Notification, Pool, PoolClient } from "pg";

Expand Down
6 changes: 3 additions & 3 deletions packages/dataplan-pg/src/adaptors/node-postgres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// TODO: This file should only be available via direct (path) import, it should not be included in the main package exports.

import LRU from "@graphile/lru";
import type { PromiseOrDirect } from "dataplanner";
import { defer } from "dataplanner";
import type { PromiseOrDirect } from "grafast";
import { defer } from "grafast";
import type { Pool, QueryArrayConfig, QueryConfig, QueryResultRow } from "pg";
import * as pg from "pg";

Expand All @@ -19,7 +19,7 @@ function escapeIdentifier(str: string): string {
}

declare global {
namespace DataPlanner {
namespace Grafast {
interface PgDatabaseAdaptorOptions {
"@dataplan/pg/adaptors/node-postgres": NodePostgresAdaptorOptions;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import type {
CrystalResultStreamList,
CrystalValuesList,
ObjectStep,
} from "dataplanner";
} from "grafast";
import {
__ValueStep,
arraysMatch,
constant,
ExecutableStep,
partitionByIndex,
} from "dataplanner";
} from "grafast";
import { EXPORTABLE } from "graphile-export";
import type { SQL } from "pg-sql2";
import sql from "pg-sql2";
Expand Down
10 changes: 5 additions & 5 deletions packages/dataplan-pg/src/examples/exampleSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*
* This is a hand-rolled GraphQL schema that we used throughout the development
* of DataPlanner; it's used for the @dataplan/pg tests and demonstrates common
* of Grafast; it's used for the @dataplan/pg tests and demonstrates common
* patterns as well as edge cases. This is NOT meant to be an example of how
* _you_ should write a schema, in particular it's (deliberately) quite
* inconsistent and has many ways of achieving the same goals. I would not
Expand All @@ -23,15 +23,15 @@ import type {
ExecutableStep,
GraphileArgumentConfig,
ListStep,
} from "dataplanner";
} from "grafast";
import {
__ListTransformStep,
__ValueStep,
connection,
ConnectionStep,
constant,
context,
dataplannerEnforce,
grafastEnforce,
each,
error,
filter,
Expand All @@ -46,7 +46,7 @@ import {
object,
operationPlan,
resolveType,
} from "dataplanner";
} from "grafast";
import { writeFileSync } from "fs";
import { EXPORTABLE } from "graphile-export";
import type { GraphQLOutputType } from "graphql";
Expand Down Expand Up @@ -4723,7 +4723,7 @@ export function makeExampleSchema(
},
});

return dataplannerEnforce(
return grafastEnforce(
new GraphQLSchema({
query: Query,
mutation: Mutation,
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import type {
ExecutionEventEmitter,
ObjectStep,
PromiseOrDirect,
} from "dataplanner";
import { defer, isAsyncIterable, isDev } from "dataplanner";
} from "grafast";
import { defer, isAsyncIterable, isDev } from "grafast";
import debugFactory from "debug";
import type { SQLRawValue } from "pg-sql2";
import { inspect } from "util";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/filters/booleanFilter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ExecutableStep } from "dataplanner";
import { ModifierStep } from "dataplanner";
import type { ExecutableStep } from "grafast";
import { ModifierStep } from "grafast";
import type { SQL } from "pg-sql2";

import type { PgTypeCodec } from "../interfaces.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/filters/classFilter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ExecutableStep } from "dataplanner";
import { ModifierStep } from "dataplanner";
import type { ExecutableStep } from "grafast";
import { ModifierStep } from "grafast";
import type { SQL } from "pg-sql2";

import type { PgTypeCodec } from "../interfaces.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/dataplan-pg/src/filters/manyFilter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ModifierStep } from "dataplanner";
import { ModifierStep } from "grafast";
import sql from "pg-sql2";

import type { PgSource } from "../datasource.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/dataplan-pg/src/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ExecutableStep } from "dataplanner";
import type { ExecutableStep } from "grafast";
import type { SQL, SQLRawValue } from "pg-sql2";

import type { PgTypeColumns } from "./codecs.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/steps/pgClassExpression.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CrystalResultsList, CrystalValuesList } from "dataplanner";
import { ExecutableStep } from "dataplanner";
import type { CrystalResultsList, CrystalValuesList } from "grafast";
import { ExecutableStep } from "grafast";
import type { SQL } from "pg-sql2";
import sql from "pg-sql2";

Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/steps/pgCondition.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from "assert";
import type { BaseStep, ExecutableStep } from "dataplanner";
import { ModifierStep } from "dataplanner";
import type { BaseStep, ExecutableStep } from "grafast";
import { ModifierStep } from "grafast";
import type { SQL } from "pg-sql2";

import type { PgTypeCodec } from "../interfaces.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/steps/pgCursor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CrystalResultsList, CrystalValuesList } from "dataplanner";
import { ExecutableStep, list } from "dataplanner";
import type { CrystalResultsList, CrystalValuesList } from "grafast";
import { ExecutableStep, list } from "grafast";
import sql from "pg-sql2";

import { TYPES } from "../codecs.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/steps/pgDelete.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CrystalResultsList, CrystalValuesList } from "dataplanner";
import { ExecutableStep, isDev } from "dataplanner";
import type { CrystalResultsList, CrystalValuesList } from "grafast";
import { ExecutableStep, isDev } from "grafast";
import type { SQL, SQLRawValue } from "pg-sql2";
import sql from "pg-sql2";
import { inspect } from "util";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/steps/pgInsert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {
CrystalValuesList,
SetterCapableStep,
SetterStep,
} from "dataplanner";
import { ExecutableStep, isDev, setter } from "dataplanner";
} from "grafast";
import { ExecutableStep, isDev, setter } from "grafast";
import type { SQL, SQLRawValue } from "pg-sql2";
import sql from "pg-sql2";
import { inspect } from "util";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/steps/pgPageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import type {
CrystalResultsList,
CrystalValuesList,
PageInfoCapableStep,
} from "dataplanner";
} from "grafast";
import {
ConnectionStep,
constant,
ExecutableStep,
first,
last,
} from "dataplanner";
} from "grafast";

import type { PgCursorStep } from "./pgCursor.js";
import type { PgSelectParsedCursorStep, PgSelectStep } from "./pgSelect.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/dataplan-pg/src/steps/pgPolymorphic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {
CrystalValuesList,
PolymorphicData,
PolymorphicStep,
} from "dataplanner";
import { ExecutableStep, isDev, polymorphicWrap } from "dataplanner";
} from "grafast";
import { ExecutableStep, isDev, polymorphicWrap } from "grafast";
import type { GraphQLObjectType } from "graphql";
import { inspect } from "util";

Expand Down
Loading

0 comments on commit 5a6b0e7

Please sign in to comment.