From 20a8d226bf2518e3b12f751b42f18e97d933d475 Mon Sep 17 00:00:00 2001 From: Max Stoiber Date: Wed, 17 Jan 2024 05:55:27 -0800 Subject: [PATCH] rm last datalayer (#123) --- packages/create-fuse-app/src/index.ts | 6 +++--- website/src/pages/docs/client/index.mdx | 2 +- website/src/pages/docs/client/javascript/nextjs.mdx | 2 +- website/src/pages/docs/server/mocking.mdx | 2 +- website/src/pages/docs/server/nodes.mdx | 2 +- website/src/pages/docs/server/queries-and-mutations.mdx | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/create-fuse-app/src/index.ts b/packages/create-fuse-app/src/index.ts index 88682cfa..5c98d708 100644 --- a/packages/create-fuse-app/src/index.ts +++ b/packages/create-fuse-app/src/index.ts @@ -14,7 +14,7 @@ const s = prompts.spinner() async function createFuseApp() { const packageManager = getPkgManager() - prompts.intro(kl.trueColor(219, 254, 1)('Fuse - Your new datalayer')) + prompts.intro(kl.trueColor(219, 254, 1)('Fuse - Your new API')) s.start('Installing fuse...') await install(packageManager, 'prod', ['fuse']) @@ -64,7 +64,7 @@ async function createFuseApp() { s.stop('Created Base files!') prompts.outro( - kl.trueColor(219, 254, 1)("You're all set to work with your datalayer!"), + kl.trueColor(219, 254, 1)("You're all set to work with your Fuse API!"), ) return } @@ -182,7 +182,7 @@ async function createFuseApp() { s.stop(kl.green('Added Fuse plugin to next config!')) prompts.outro( - kl.trueColor(219, 254, 1)("You're all set to work with your datalayer!"), + kl.trueColor(219, 254, 1)("You're all set to work with your Fuse API!"), ) } diff --git a/website/src/pages/docs/client/index.mdx b/website/src/pages/docs/client/index.mdx index ea246a6f..e76dbb41 100644 --- a/website/src/pages/docs/client/index.mdx +++ b/website/src/pages/docs/client/index.mdx @@ -30,7 +30,7 @@ help with typing your results, variables and facilitating the client-methods. Let's go over each file: - [`fuse/client.ts`](/docs/basics/client/client-components): This is the main entry-point for React client components (including `'use client'` in Next.js's App Router). It exports the `useQuery`/... hooks which you can use in your - client components to talk to your datalayer. + client components to talk to your API. - [`fuse/server.ts`](/docs/basics/client/server-components): This is the main entry-point for React server components and server actions. It exports an `execute` function which takes a `Document` and `variables` and will execute the operation in-process without an extra HTTP request to the API. - [`fuse/fragment-masking.ts`](/docs/basics/client/best-practices): The `useFragment` and `FragmentType` helpers are exported from here, diff --git a/website/src/pages/docs/client/javascript/nextjs.mdx b/website/src/pages/docs/client/javascript/nextjs.mdx index 2c76f76d..5048d02c 100644 --- a/website/src/pages/docs/client/javascript/nextjs.mdx +++ b/website/src/pages/docs/client/javascript/nextjs.mdx @@ -22,7 +22,7 @@ import { } from '@/fuse/client' import React from 'react' -export const DatalayerProvider = (props: any) => { +export const GraphQLClientProvider = (props: any) => { const [client, ssr] = React.useMemo(() => { const { client, ssr } = createClient({ url: 'http://localhost:3000/api/fuse', diff --git a/website/src/pages/docs/server/mocking.mdx b/website/src/pages/docs/server/mocking.mdx index 8c1123ae..b766c2f8 100644 --- a/website/src/pages/docs/server/mocking.mdx +++ b/website/src/pages/docs/server/mocking.mdx @@ -3,7 +3,7 @@ import { Explain } from "@/components/Explain" # Mocking data Sometimes you're waiting for the backend team to add a new property to the resource, that -however should not stop you from developing the frontend. You can mock the data in the datalayer +however should not stop you from developing the frontend. You can mock the data in the API and prototype your feature on top of that. ## Mocking fields diff --git a/website/src/pages/docs/server/nodes.mdx b/website/src/pages/docs/server/nodes.mdx index e5f8aa29..1d6f20ca 100644 --- a/website/src/pages/docs/server/nodes.mdx +++ b/website/src/pages/docs/server/nodes.mdx @@ -125,7 +125,7 @@ Now we can invoke that with `VXNlcjox` and we'll get our user named `John` as a ## Connecting nodes -In the datalayer we want our data to be connected so we can do a single API call to retrieve +In the API we want our data to be connected so we can do a single request to retrieve all the resources we need to show the data on the screen. ### Referencing other nodes diff --git a/website/src/pages/docs/server/queries-and-mutations.mdx b/website/src/pages/docs/server/queries-and-mutations.mdx index a0e056f5..c6be89d6 100644 --- a/website/src/pages/docs/server/queries-and-mutations.mdx +++ b/website/src/pages/docs/server/queries-and-mutations.mdx @@ -2,7 +2,7 @@ import { Explain } from "@/components/Explain" # Queries and Mutations -The datalayer consists of entry-points which we will use to fulfill our data-requirements, often +The API consists of entry-points which we will use to fulfill our data-requirements, often when we start a new page we'll need to either use an existing entry-point or create a new one. For retrieving data one or more of those entry-points can be created with the `addQueryFields` function. @@ -21,7 +21,7 @@ addQueryFields(t => ({ The above could for instance be an entry-point for a `profile` page or any page that has a menu-dropdown welcoming the user. -Our datalayer should also be able to manipulate data, these are referred to as `mutations` and can be added +Our API should also be able to manipulate data, these are referred to as `mutations` and can be added similarly to `query` entry-points by means of `addMutationFields`. ```typescript