Skip to content

Commit

Permalink
rm last datalayer (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr authored Jan 17, 2024
1 parent 47803b5 commit 20a8d22
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions packages/create-fuse-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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!"),
)
}

Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/client/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Explain term='documents'>`Document`</Explain> 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,
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/client/javascript/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/server/mocking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/server/nodes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/docs/server/queries-and-mutations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

1 comment on commit 20a8d22

@vercel
Copy link

@vercel vercel bot commented on 20a8d22 Jan 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

spacex-fuse – ./examples/spacex

spacex-fuse-stellate.vercel.app
spacex-fuse.vercel.app
spacex-fuse-git-main-stellate.vercel.app

Please sign in to comment.