Skip to content

Instantly share code, notes, and snippets.

Avatar

Blazej Owczarczyk blazeyo

View GitHub Profile
View gist:b3c4e53563ab477898b63dc408d99f65
<?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;
/**
View NodeStoryParagraphImage.php
<?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 Oct 19, 2018
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.
View package.json
{
"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",