Skip to content

Instantly share code, notes, and snippets.

View blazeyo's full-sized avatar

Blazej Owczarczyk blazeyo

View GitHub Profile
<?php
namespace Drupal\my_module\Plugin\GraphQL\Fields\Entity;
use Drupal\Core\Entity\EntityInterface;
use Drupal\graphql\GraphQL\Execution\ResolveContext;
use Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase;
use GraphQL\Type\Definition\ResolveInfo;
/**
<?php
namespace Drupal\my_module\Plugin\GraphQL\Fields\Entity;
use Drupal\Core\Entity\EntityInterface;
use Drupal\graphql\GraphQL\Execution\ResolveContext;
use Drupal\graphql\Plugin\GraphQL\Fields\FieldPluginBase;
use GraphQL\Type\Definition\ResolveInfo;
/**
* @GraphQLField(
* id = "node_story_field_paragraph_image",
* secure = true,
@blazeyo
blazeyo / package.json
Last active October 19, 2018 21:18
Package json for transpiling javascript. Put it in the root of you drupal composer project and run `yarn install`. `yarn watch:js-dev` will start the file watcher.
{
"name": "project-name",
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
"babel-core": "6.24.1",
"babel-plugin-add-header-comment": "^1.0.3",
"babel-preset-env": "1.4.0",
"chalk": "^1.1.3",
"chokidar": "1.6.1",