Skip to content

Instantly share code, notes, and snippets.

View yossisp's full-sized avatar

Yossi Spektor yossisp

  • Tel Aviv, Israel
View GitHub Profile
@ArVan
ArVan / app.js
Last active March 11, 2021 03:06
JWT Authentication with Passport
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var index = require('./routes/index');
var user = require('./routes/user');
var auth = require('./routes/auth');
add_action( 'graphql_register_types', function() {
register_graphql_connection([
'fromType' => 'Tag',
'toType' => 'ContentNode',
'fromFieldName' => 'contentNodes',
'resolve' => function( \WPGraphQL\Model\Term $source, $args, $context, $info ) {
// Get all post types allowed in GraphQL
$post_types = WPGraphQL::get_allowed_post_types();
// Instantiate a new PostObjectConnectionResolver class