Skip to content

Commit

Permalink
Cleanup client IA
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr committed Jan 12, 2024
1 parent 222cbf8 commit ff465fc
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 21 deletions.
11 changes: 3 additions & 8 deletions website/src/pages/docs/client/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"index": "Overview",
"react": "React & React Native (first-class)",
"nextjs": "Next.js (first-class)",
"vue": "Vue (first-class)",
"angular": "Angular (first-class)",
"ios": "iOS",
"android": "Android (Java/Kotlin)",
"http": "HTTP",
"best-practices": "Best practices"
"best-practices": "Best practices",
"javascript": "JavaScript frameworks",
"other": "Other languages & frameworks"
}
21 changes: 10 additions & 11 deletions website/src/pages/docs/client/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ import { Explain } from "@/components/Explain"

# Querying from the client

Fuse **generates a fully type-safe TypeScript client** (more languages coming) during `fuse dev` and `fuse build` that is compatible with all popular JavaScript-based frameworks (see [how to opt-out of client code generation](#disabling-the-client-code-generation) below):

Fuse has first-class support for certain frameworks (working on adding more!). For these frameworks, it generates a type-safe API client during `fuse dev` and `fuse build` (see [how to opt-out of client code generation](#disabling-the-client-code-generation) below):
- [React & React Native](/docs/client/javascript/react)
- [Next.js](/docs/client/javascript/nextjs)
- [Vue](/docs/client/javascript/vue)
- [Angular](/docs/client/javascript/angular)

- [React & React Native (first-class)](/docs/client/react)
- [Next.js (first-class)](/docs/client/nextjs)
- [Vue (first-class)](/docs/client/vue)
- [Angular (first-class)](/docs/client/angular)
However, even if your framework of choice isn't on this list (yet), Fuse creates a standard GraphQL API at its core. That means **your API can be accessed with any GraphQL client in any language** and you could even access it with raw HTTP requests if you are in an environment that doesn't have a GraphQL client available:

Fuse creates a GraphQL API at its core, which means **your API is compatible with any GraphQL client in any language** or even just send HTTP requests for languages that don't have GraphQL clients:

- [iOS (Swift)](/docs/client/ios)
- [Android (Java/Kotlin)](/docs/client/android)
- [HTTP](/docs/client/http)
- [iOS (Swift)](/docs/client/other/ios)
- [Android (Java/Kotlin)](/docs/client/other/android)
- [Raw HTTP access](/docs/client/other/http)

We also keep a [list of recommended best practices for client data fetching](/docs/client/best-practices), specifically we strongly encourage the use of fragment co-location.

## Client code generation (first-class support)
## Client code generation

When you run `fuse dev/build` (or `next dev/build` if using [the Next.js plugin](/docs/setting-fuse-up-manually/nextjs)), Fuse will automatically generate a type-safe GraphQL API client for React, React Native & Next.js.

Expand Down
6 changes: 6 additions & 0 deletions website/src/pages/docs/client/javascript/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"react": "React & React Native",
"nextjs": "Next.js",
"vue": "Vue",
"angular": "Angular"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions website/src/pages/docs/client/other/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ios": "iOS",
"android": "Android (Java/Kotlin)",
"http": "HTTP"
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# HTTP
# Raw HTTP access to your Fuse API

Fuse creates a standard GraphQL API under the hood, which means you can use any HTTP client to construct a request and fetch data from your API.

Note that we **strongly recommend using a GraphQL client if your application is a web or mobile app**. Practically all popular mobile and web frameworks and languages have a GraphQL client.
Note that we **strongly recommend using a GraphQL client if one is available**. Practically all popular mobile and web frameworks and languages have a GraphQL client.

## How to query your GraphQL API via HTTP

Expand Down
File renamed without changes.

0 comments on commit ff465fc

Please sign in to comment.