Skip to content

5.1.0 #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions apollo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions apollo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ const typeDefs = `#graphql
Test the client options.
"""
testClientOptions(path: String!): TestClientOptions

"""
Returns the same value.
"""
returnSameValue(value: Int!): Int!
}

type UploadedFile {
Expand Down Expand Up @@ -298,6 +303,9 @@ const resolvers = {
languageFromPath: getLanguageFromPath(args.path),
}
},
returnSameValue: (_parent: any, args: any, context: any) => {
return args.value
},
},
User: {
friends: () => {
Expand Down
1 change: 1 addition & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default defineBuildConfig({
],
externals: [
'ofetch',
'ohash',
'h3',
'graphql',
'@graphql-tools/load',
Expand Down
33 changes: 33 additions & 0 deletions docs/advanced/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,39 @@ function isUserQuery(name: ValidQueryName): boolean {
}
```

## `operation-hashes`

**Alias: `#nuxt-graphql-middleware/operation-hashes`**

Exports the unique hash for every operation.

### Exports

#### `operationHashes`

An object of operation names as key and hashes as values. The hash is calculated
from the operation source + all fragments used in the fragment.

## `operation-variables`

**Alias: `#nuxt-graphql-middleware/operation-variables`**

Exports an object with operation names as properties and variable names as
values.

### Exports

#### `operationVariables`

```js
export const operationVariables = {
initState: [],
testClientOptions: ['path'],
deleteUser: ['id'],
createUser: ['name', 'age'],
}
```

## `response`

**Alias: `#nuxt-graphql-middleware/response`**
Expand Down
Loading
Loading