vendure-ecommerce/deity-falcon-vendure-api

Voucher code isn't working

macabeus opened this issue · 1 comments

I'm starting to learn and organize my project to use Vendure.
So I set up the Vendure's backend, DEITY Falcon backend and its front, then almost everything works fine. But I noticed that discount isn't working. When I tried to active a discount I receive the following error:

image

Looks like an error on Falcon server, because nothing is showed on logs from Vendure.
On Falcon server there are the following logs:

[2020-09-23 15:42:02.789] ERROR: shop: api-vendure.applyCoupon() resolver method is not defined!

GraphQL Error Code: INTERNAL_SERVER_ERROR
Path: applyCoupon

File: /Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/@deity/falcon-server-env/src/models/Extension.ts
--------------------------------------------------------------------------------------------------------------------------------
  90 |           args: any,
  91 |           context: GraphQLContext,
  92 |           info: GraphQLResolveInfo
  93 |         ) => {
  94 |           if (typeof (this.getApi(context) as any)[fieldName] !== 'function') {
  95 |             throw new Error(`${this.name}: ${this.config.api}.${fieldName}() resolver method is not defined!`);
  96 |           }
  97 |           return (this.getApi(context) as any)[fieldName](obj, args, context, info);
  98 |         };
  99 |       });
 100 |     });
--------------------------------------------------------------------------------------------------------------------------------

    Error: shop: api-vendure.applyCoupon() resolver method is not defined!
        at resolvers.<computed>.<computed> (/Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/@deity/falcon-server-env/src/models/Extension.ts:95:19)
        at field.resolve (/Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/graphql-tools/src/stitching/mergeSchemas.ts:296:16)
        at field.resolve (/Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/apollo-server-core/node_modules/graphql-extensions/src/index.ts:267:18)
        at resolveFieldValueOrError (/Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/graphql/execution/execute.js:467:18)
        at resolveField (/Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/graphql/execution/execute.js:434:16)
        at /Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/graphql/execution/execute.js:244:18
        at /Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/graphql/jsutils/promiseReduce.js:23:10
        at Array.reduce (<anonymous>)
        at promiseReduce (/Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/graphql/jsutils/promiseReduce.js:20:17)
        at executeFieldsSerially (/Users/macabeus/ApenasMeu/ql/vendure-npx/my-falcon/server/node_modules/graphql/execution/execute.js:241:37)

I'm closing this and archiving this repo because Deity just announced that Falcon will no longer be open source. In Slack messages dated 4th Nov 2020, it was announced:

Falcon Open Source will no longer be available openly, but only in private repositories.
Q: will the npm packages still be openly available?
they won't be openly available but if you need access we can give it to you and your team.

Therefore it is no longer feasible to maintain an adapter for what is now a closed-source project, where setting up a dev environment is not easy.