feat: Application types generation from project GQL schema's (#8995)

This commit is contained in:
Adrien de Peretti
2024-09-06 11:45:32 +02:00
committed by GitHub
parent ac30a989f4
commit 2c5e72d141
92 changed files with 5129 additions and 443 deletions

View File

@@ -1,12 +1,12 @@
import { IApiKeyModuleService } from "@medusajs/types"
import { ApiKeyType, Module, Modules } from "@medusajs/utils"
import { ApiKeyModuleService } from "@services"
import crypto from "crypto"
import { moduleIntegrationTestRunner } from "medusa-test-utils"
import {
createPublishableKeyFixture,
createSecretKeyFixture,
} from "../__fixtures__"
import { ApiKeyModuleService } from "@services"
jest.setTimeout(100000)
@@ -47,7 +47,9 @@ moduleIntegrationTestRunner<IApiKeyModuleService>({
expect(Object.keys(linkable)).toEqual(["apiKey"])
linkable.apiKey.toJSON = undefined
Object.keys(linkable).forEach((key) => {
delete linkable[key].toJSON
})
expect(linkable.apiKey).toEqual({
id: {
@@ -56,6 +58,12 @@ moduleIntegrationTestRunner<IApiKeyModuleService>({
serviceName: "apiKey",
field: "apiKey",
},
publishable_key_id: {
field: "apiKey",
linkable: "publishable_key_id",
primaryKey: "publishable_key_id",
serviceName: "apiKey",
},
})
})