@prefabs.tech/fastify-graphql 0.90.0 → 0.90.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("fastify-plugin"),a=require("mercurius"),n=require("graphql-tag"),g=require("@graphql-tools/merge"),c=r=>async(e,i)=>{const t={config:e.config,database:e.slonik,dbSchema:e.dbSchema};if(r)for(const o of r)await o.updateContext(t,e,i);return t},s=async(r,e)=>{if(r.log.info("Registering fastify-graphql plugin"),Object.keys(e).length===0){if(r.log.warn("The graphql plugin now recommends passing graphql options directly to the plugin."),!r.config.graphql)throw new Error("Missing graphql configuration. Did you forget to pass it to the graphql plugin?");e=r.config.graphql}e?.enabled?await r.register(a.mercurius,{context:c(e.plugins),...e}):r.log.info("GraphQL API not enabled")},u=l(s),p=n.gql`
2
+ directive @auth(
3
+ profileValidation: Boolean
4
+ emailVerification: Boolean
5
+ ) on OBJECT | FIELD_DEFINITION
6
+ directive @hasPermission(permission: String!) on OBJECT | FIELD_DEFINITION
7
+
8
+ scalar DateTime
9
+ scalar JSON
10
+
11
+ input Filters {
12
+ AND: [Filters]
13
+ OR: [Filters]
14
+ not: Boolean
15
+ key: String
16
+ operator: String
17
+ value: String
18
+ }
19
+
20
+ enum SortDirection {
21
+ ASC
22
+ DESC
23
+ }
24
+
25
+ input SortInput {
26
+ key: String
27
+ direction: SortDirection
28
+ }
29
+
30
+ type DeleteResult {
31
+ result: Boolean!
32
+ }
33
+ `;Object.defineProperty(exports,"gql",{enumerable:!0,get:()=>n.gql});Object.defineProperty(exports,"mergeTypeDefs",{enumerable:!0,get:()=>g.mergeTypeDefs});exports.baseSchema=p;exports.default=u;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prefabs.tech/fastify-graphql",
3
- "version": "0.90.0",
3
+ "version": "0.90.1",
4
4
  "description": "Fastify graphql plugin",
5
5
  "homepage": "https://github.com/prefabs-tech/fastify/tree/main/packages/graphql#readme",
6
6
  "repository": {
@@ -13,10 +13,10 @@
13
13
  "exports": {
14
14
  ".": {
15
15
  "import": "./dist/prefabs-tech-fastify-graphql.js",
16
- "require": "./dist/prefabs-tech-fastify-graphql.umd.cjs"
16
+ "require": "./dist/prefabs-tech-fastify-graphql.cjs"
17
17
  }
18
18
  },
19
- "main": "./dist/prefabs-tech-fastify-graphql.umd.cjs",
19
+ "main": "./dist/prefabs-tech-fastify-graphql.cjs",
20
20
  "module": "./dist/prefabs-tech-fastify-graphql.js",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "files": [
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@prefabs.tech/eslint-config": "0.2.0",
31
- "@prefabs.tech/fastify-config": "0.90.0",
32
- "@prefabs.tech/fastify-slonik": "0.90.0",
31
+ "@prefabs.tech/fastify-config": "0.90.1",
32
+ "@prefabs.tech/fastify-slonik": "0.90.1",
33
33
  "@prefabs.tech/tsconfig": "0.2.0",
34
34
  "@types/node": "20.19.9",
35
35
  "@typescript-eslint/eslint-plugin": "8.38.0",
@@ -56,8 +56,8 @@
56
56
  "zod": "3.25.67"
57
57
  },
58
58
  "peerDependencies": {
59
- "@prefabs.tech/fastify-config": "0.90.0",
60
- "@prefabs.tech/fastify-slonik": "0.90.0",
59
+ "@prefabs.tech/fastify-config": "0.90.1",
60
+ "@prefabs.tech/fastify-slonik": "0.90.1",
61
61
  "fastify": ">=5.2.1",
62
62
  "fastify-plugin": ">=5.0.1",
63
63
  "graphql": ">=16.9.0",
@@ -1,33 +0,0 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("fastify-plugin"),require("mercurius"),require("graphql-tag"),require("@graphql-tools/merge")):typeof define=="function"&&define.amd?define(["exports","fastify-plugin","mercurius","graphql-tag","@graphql-tools/merge"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.PrefabsTechFastifyGraphql={},e.FastifyPlugin,e.Mercurius,e.GraphqlTag,e.GraphqlToolsMerge))})(this,function(e,n,l,t,a){"use strict";const g=r=>async(i,c)=>{const o={config:i.config,database:i.slonik,dbSchema:i.dbSchema};if(r)for(const p of r)await p.updateContext(o,i,c);return o},u=n(async(r,i)=>{if(r.log.info("Registering fastify-graphql plugin"),Object.keys(i).length===0){if(r.log.warn("The graphql plugin now recommends passing graphql options directly to the plugin."),!r.config.graphql)throw new Error("Missing graphql configuration. Did you forget to pass it to the graphql plugin?");i=r.config.graphql}i?.enabled?await r.register(l.mercurius,{context:g(i.plugins),...i}):r.log.info("GraphQL API not enabled")}),s=t.gql`
2
- directive @auth(
3
- profileValidation: Boolean
4
- emailVerification: Boolean
5
- ) on OBJECT | FIELD_DEFINITION
6
- directive @hasPermission(permission: String!) on OBJECT | FIELD_DEFINITION
7
-
8
- scalar DateTime
9
- scalar JSON
10
-
11
- input Filters {
12
- AND: [Filters]
13
- OR: [Filters]
14
- not: Boolean
15
- key: String
16
- operator: String
17
- value: String
18
- }
19
-
20
- enum SortDirection {
21
- ASC
22
- DESC
23
- }
24
-
25
- input SortInput {
26
- key: String
27
- direction: SortDirection
28
- }
29
-
30
- type DeleteResult {
31
- result: Boolean!
32
- }
33
- `;Object.defineProperty(e,"gql",{enumerable:!0,get:()=>t.gql}),Object.defineProperty(e,"mergeTypeDefs",{enumerable:!0,get:()=>a.mergeTypeDefs}),e.baseSchema=s,e.default=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});