Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jumpn/utils-graphql

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jumpn/utils-graphql - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

2

package.json
{
"name": "@jumpn/utils-graphql",
"version": "0.4.1",
"version": "0.5.0",
"description": "GraphQL utilities",

@@ -5,0 +5,0 @@ "module": "dist/index.js",

@@ -17,2 +17,4 @@ # @jumpn/utils-graphql

- [hasSubscription](#hassubscription)
- [requestFromCompat](#requestfromcompat)
- [requestToCompat](#requesttocompat)
- [License](#license)

@@ -127,4 +129,60 @@

### requestFromCompat
Creates a GqlRequest using given GqlRequestCompat
**Parameters**
- `gqlRequestCompat` **GqlRequestCompat<Variables>**
- `gqlRequestCompat.query`
- `gqlRequestCompat.variables`
**Examples**
```javascript
const query = `
query userQuery($userId: ID!) {
user(userId: $userId) {
id
email
}
}
`;
console.log(requestFromCompat({query, variables: {userId: 10}}));
// {operation: "...", variables: {userId: 10}}
```
Returns **GqlRequest<Variables>**
### requestToCompat
Creates a GqlRequest using given GqlRequestCompat
**Parameters**
- `gqlRequest` **GqlRequest<Variables>**
- `gqlRequest.operation`
- `gqlRequest.variables`
**Examples**
```javascript
const operation = `
query userQuery($userId: ID!) {
user(userId: $userId) {
id
email
}
}
`;
console.log(requestToCompat({operation, variables: {userId: 10}}));
// {query: "...", variables: {userId: 10}}
```
Returns **GqlRequestCompat<Variables>**
## License
[MIT](LICENSE.txt) :copyright: **Jumpn Limited** / Mauro Titimoli (mauro@jumpn.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc