Skip to content

Commit

Permalink
SOFA x Nextra 3 (#1377)
Browse files Browse the repository at this point in the history
* upd

* upd

* upd

* yarn.lock

* fix typo

* bump
  • Loading branch information
dimaMachina authored Nov 23, 2023
1 parent ffe6e67 commit d4f9437
Show file tree
Hide file tree
Showing 10 changed files with 1,445 additions and 972 deletions.
1 change: 1 addition & 0 deletions website/next-sitemap.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
module.exports = {
siteUrl: process.env.SITE_URL || 'https://the-guild.dev/graphql/sofa-api',
generateIndexSitemap: false,
exclude: ['*/_meta'],
};
27 changes: 14 additions & 13 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@
"start": "next start"
},
"dependencies": {
"lottie-web": "5.11.0",
"@theguild/components": "5.2.1",
"next": "13.4.3",
"next-sitemap": "4.1.3",
"react": "18.2.0",
"react-dom": "18.2.0"
"lottie-web": "^5.11.0",
"@theguild/components": "^6.0.1",
"next": "^13.5.4",
"next-sitemap": "^4.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@theguild/algolia": "1.1.7",
"@theguild/tailwind-config": "0.2.1",
"@types/node": "18.16.14",
"@types/react": "18.2.6",
"postcss-import": "15.1.0",
"tailwindcss": "3.3.2",
"typescript": "5.0.4"
"@theguild/algolia": "1.1.9",
"@theguild/tailwind-config": "0.3.0",
"@types/node": "20.8.4",
"@types/react": "18.2.28",
"typescript": "5.2.2"
},
"resolutions": {
"hast-util-to-estree": "^2.3.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
export default {
"index": {
"title": "Home",
"type": "page",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
export default {
"index": "Introduction",
"essentials": "Essentials",
"recipes": "Recipes",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
export default {
"models": "Nested Data and Models",
"context": "Using Context",
"ignore": "Using Objects Instead of IDs",
Expand Down
10 changes: 5 additions & 5 deletions website/src/pages/docs/api/method.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ import { Callout } from '@theguild/components'

# Customize Endpoint's HTTP Method

Sofa allows you to cutomize the http method. For example, in case you need `POST` instead of `GET` method in one of your query, you do the following:
Sofa allows you to customize the http method. For example, in case you need `POST` instead of `GET` method in one of your query, you do the following:

```typescript
```js
api.use(
'/api',
useSofa({
schema,
routes: {
'Query.feed': { method: 'POST' },
},
'Query.feed': { method: 'POST' }
}
})
);
)
```

When Sofa tries to define a route for `feed` of `Query`, instead of exposing it under `GET` (default for Query type) it will use `POST` method.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
export default {
"queries": "Queries",
"mutations": "Mutations",
"subscriptions": "Subscriptions"
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm i sofa-api

## Usage

```typescript
```js
import { useSofa } from 'sofa-api';
import express from 'express';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
export default {
"open-api": "OpenAPI (Swagger)"
}
Loading

0 comments on commit d4f9437

Please sign in to comment.