nestjs-shopify-auth
Advanced tools
Changelog
2.1.4
Changelog
2.1.3
Changelog
2.1.2
Changelog
2.1.1
Changelog
2.1.0
@UseShopifyAuth
decorator for usage in controllers to check for Online or Offline sessionsShopfiyAuthExceptionFilter
testingChangelog
2.0.1
bodyParser
usageChangelog
2.0.0
⚠️ [Breaking] Rewrite GraphQL handler to not take over the entirety of the request and response.
This removes the requirement of installing body-parser
and disabling the bodyParser
logic of NextJS just to use this package.
Before:
// main.ts
import { NestFactory } from '@nestjs/core';
import { json } from 'body-parser';
import { AppModule } from './app.module';
async function bootstrap() {
const jsonParseMiddleware = json();
const app = await NestFactory.create(AppModule, { bodyParser: false });
app.use((req, res, next) => {
// NOTE: Make sure this is the same `path` you pass to the `ShopifyAuthModule.registerOnlineAsync`.
if (req.path.indexOf('/graphql') === 0) {
next();
} else {
jsonParseMiddleware(req, res, next);
}
});
await app.listen(3000);
}
bootstrap();
After:
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();