Newsfeeds

Talking with Asmodee About the Effects of Counterfeit Games

Tabletop Gaming News - 9 January 2018 - 9:35am
Roolex. Versachee. Sorny. Magnetbox. The world of counterfeiting might seem funny at the outset, but it’s a real issue in the world. And as the gaming industry has expanded, the chance for scammers to make some quick money on cheap, knock-off versions of popular titles is certainly there. ICv2 recently sat down with execs at […]
Categories: Game Theory & Design

Google Calendar Import

New Drupal Modules - 9 January 2018 - 8:49am

Managing calendar events is really tough - particularly with repeating events, rule exceptions, etc. Instead of managing this information directly in Drupal, this module provides a way to import Google Calendar events from a publicly available calendar into Drupal.

Once into Drupal, you can layer on additional fields, theming, access control, and all the other things that make Drupal Entities so excellent to work with.

Categories: Drupal

Privateer Press Previews New Warmachine/Hordes Minis

Tabletop Gaming News - 9 January 2018 - 8:00am
Privateer Press is showing off some new Warmachine and Hordes releases. When checking them out, I suggest putting on some Creedence Clearwater Revival. Particularly Born on the Bayou, as most of the new figures are for the Blindwater Congregation. But there’s also a look at a new sculpt for a classic Skorne warlock, plus a […]
Categories: Game Theory & Design

Endless Space 2 - E.N.F.E.R. Alternate Reality Game - by Jeff Spock

Gamasutra.com Blogs - 9 January 2018 - 7:19am
Amplitude put together an ARG (Alternate Reality Game) for the release of Endless Space 2, based on an in-game AI character. It turned out to be larger, more complex, more fun, and more work than we expected. We would definitely do it again...
Categories: Game Theory & Design

How to actually finish your first game this year - by Chris Zukowski

Gamasutra.com Blogs - 9 January 2018 - 7:11am
Your first game should be simple they say. What does "simple" even mean?
Categories: Game Theory & Design

Splatoon 2: How it Encourages Movement - by Max Pears

Gamasutra.com Blogs - 9 January 2018 - 7:03am
Breaking down how the Splatoon series on how the encourage movement in their multiplayer. Making this the dominant strategy to win. All this has been done with Objectives, Mechanics, etc.
Categories: Game Theory & Design

CMON Previews A Mercenary Shaman for HATE

Tabletop Gaming News - 9 January 2018 - 7:00am
In the post-apocalyptic world, people have turned to the worship of the old gods and spirits that inhabit the ethereal realm. But it’s not always just the good spirits that they pray to. In such harsh, evil times, you might just need a harsh, evil god. These Shamans can bring powerful and different abilities to […]
Categories: Game Theory & Design

Matt Glaman: My first day with React.js

Planet Drupal - 9 January 2018 - 7:00am
My first day with React.js mglaman Tue, 01/09/2018 - 09:00

On New Years Day I sat down over ReactJS and decided to see what all the commotion was about. I primarily work on the backend and have dabbled lightly with AngularJS. Generally, my JavaScript work just falls to basic DOM manipulation using vanilla JS or jQuery. Nothing fancy, no components. ReactJS is fun.

Categories: Drupal

Record over $3B AR/VR investment in 2017 ($1.5B+ in Q4) - by Tim Merel

Gamasutra.com Blogs - 9 January 2018 - 7:00am
AR/VR investment records were broken last year as startups raised over $3 billion across 28 AR/VR categories (over $1.5 billion in Q4 2017). Plus Magic Leap revealed its product and took less than a fifth of all investment. Who knew that could happen?
Categories: Game Theory & Design

The limitations of matchmaking without server logic - by Joost van Dongen

Gamasutra.com Blogs - 9 January 2018 - 6:58am
Generic matchmaking systems on Steam/Playstation/Xbox make development easier, but limit how much control you have over matchmaking. This post discusses several approaches we tried in Awesomenauts and why we ultimately developed our own from scratch.
Categories: Game Theory & Design

Minimalist container library in C (part 1) - by Niklas Gray

Gamasutra.com Blogs - 9 January 2018 - 6:57am
How to implement a minimalist library of container types in C.
Categories: Game Theory & Design

Dissecting Design -- South Park Phone Destroyer - by Josh Bycer

Gamasutra.com Blogs - 9 January 2018 - 6:57am
Each week, Game Design Analyst Josh Bycer takes a closer look at a video game. This week, it's the monetization issues of South Park Phone Destroyer
Categories: Game Theory & Design

Make grinding fun - The Synergy of the Battle-System and the Progression-System in JRPGs / Turn-Based-Strategy Games - by Benjamin Wolf

Gamasutra.com Blogs - 9 January 2018 - 6:55am
While grinding is a part of a JRPG the boredom that comes with it does not have to be part of it. A synergy between Battle- & Progression-System can help make grinding fun by giving every battle a satisfying feeling.
Categories: Game Theory & Design

Zivtech: Why We Abandoned SASS in Our Drupal Theme

Planet Drupal - 9 January 2018 - 6:25am
Why we abandoned SASS and switched to PostCSS in our Drupal theme

A few months ago at Zivtech, our team started to look at best ways to improve the performance of our theme and take full advantage of controlling our markup with twig. We had ported our D7 theme for Drupal 8 and added a lot of great functionalities, such as Pattern Lab, CSS regression tests, etc. We wrote our own utility classes, Mixins and SASS functions, integrated flexboxgrid, and used Gutenberg as a responsive typography system. While we had all that we needed, we still ended up with too much convolution in our process and bloated CSS bundles at the end of our projects.

While SASS has helped us tremendously and allowed fast paced development in the past few years, we lost track of our CSS output. It’s a common complaint about preprocessors, and if we take a closer look at the important CSS conventions we need to watch for (DRY, reusable, less specific, no deep nesting, etc.), I can see how we slowly drifted away from a rigorous implementation. There are several reasons for it, SASS not necessarily being the culprit. It is a very versatile tool, and as such, the responsibility falls on its user. The real question is how to implement a proper workflow that we can enforce as a team in order to:

  • Deliver a consistent product
  • Improve performance and quality
  • Facilitate development among developers

The answer may be…write less CSS! Not LESS, less. Leverage TWIG to write or generate dynamic classes based on a solid set of utility classes. The concept is not new, but front-end Drupal developers have been burned by the lack of control of the markup for a long time. We don’t have excuses now, so let’s change our ways and enter the postmodern era.

Read more
Categories: Drupal

Fantasy Flight Previews the Chimera Expansion For Star Wars: Armada

Tabletop Gaming News - 9 January 2018 - 6:00am
Grand Admiral Thrawn is possibly the greatest threat to ever face the Rebellion and the New Republic. His deep knowledge of different races’ history, art, and philosophy gave him an edge in combat unlike any other commander. His 7th Fleet wreaked all sorts of havoc, being led by Thrawn’s flagship, the Chimera. Soon, you’ll be […]
Categories: Game Theory & Design

The Watch Review

Gnome Stew - 9 January 2018 - 5:00am

Looking back on last year, if 2017 taught us anything, it’s that we really need to spend some time looking at how we view issues of gender, and how traditional views on the topic—unexamined—can allow a dangerous and damaging status quo to survive and thrive.

The Watch is a game that examines gender roles and the dangers of failing to challenge traditional ideas about gender relationships, and frames that examination in an epic military fantasy narrative. It is a Powered by the Apocalypse game that was on Kickstarter last year, and entered full distribution at the end of 2017.

It has been a while since I put this disclaimer in place, but I feel like I should issue it here, once again—when I review a game, I’m looking at using the game at the table, and my ability to recommend it to a wide range of players for use. That is a separate measure than evaluating a game’s importance, or its value as art.

Appearance and Structure

This review is based on the final PDF version of the RPG. The PDF is 175 pages—this includes a three-page index and a two-page index specifically referencing the moves in the game. The book is in black and white, except for the accent color on the cover, highlighting the title in red.

The interior art is all line art by Claudia Cangini, and it helps to reinforce a consistent look and feel for the game. The art is clean and presents a wide range of character types in combat and at camp, which mirrors the flow of the game, following characters on missions and between them.

 

Before the Shadow and Preface

The initial sections of the game detail what the setting looked like before the current crisis that the PCs will be playing through, and then explains the premise of the game, in broad strokes. It also discusses gender, in general, and how it relates to the theme of the game.

The setting was—before the shadow—a somewhat standard fantasy setting organized into various clans, some of which had their own rivalries and grudges. The Shadow arrived, and forces the clans to work together to confront some uncomfortable realities of their existence.

There is a very clear discussion on the theme of the game. Gender identity matters. The Shadow acts most strongly on those that identify as male, and this pull is based on identity, not genetics. This is very important to the theme of the game, because it is very clearly stated that The Shadow is a fictional representation of the negative effects of toxic masculinity on a society.

Women are not immune to the Shadow, but those that identify as male have a much harder time resisting, which has led to The Watch, the military of the consolidated clans, being formed from the women of the clans. Males from the clans are kept away from the front lines, as the males taken by the Shadow are twisted, over time, into dangerous creatures.

No one is immune, but males must sit on the sidelines. The important aspect of this situation isn’t that “men are bad,” but that the women fighting to protect their society can’t afford to assume that some of them are “the good ones” until the Shadow is confronted and defeated.

The Basics 

This section gives a broad overview of the concepts that are common to many Powered by the Apocalypse games, such as rolling when moves are triggered, what playbooks are, stats, and the terminology used. If you aren’t familiar with these terms, playbooks serve as character sheet/character class hybrids that players can choose for their characters.

The chapter refers players to the X-Card, created by John Stavropoulos, as an example of a safety measure for use in the game. The importance of safety tools, and respecting the boundaries of players, is also addressed. Given that the game touches on topics of gender, the problems that arise from toxic expressions of gender stereotypes, war, and loss, it’s a very important piece to keep in mind.

Moves are triggered by the fiction. Players discuss what their characters are doing, and if those actions align with the description of the moves defined in the game, a roll is made, and the MC that is facilitating the game helps the player adjudicate what happens according to the roll.

The Watch has a slightly different way to track advancement—in addition to the more standard experience track it also has a Jaded track.

  • Characters get experience for completing missions, or by using highlighted moves from their playbooks—this experience can be used to buy various expanded moves native to the playbooks
  • Characters can also mark Jaded on their sheets when the war against the Shadow hardens them—they can take Jaded moves as the track fills up, but too many Jaded moves, and the character leaves the fight against the Shadow, one way or the other

Characters also track multiple states in the game to model the effects on the ongoing war effort, and the connection the characters have to others fighting in that war.

  • Characters track weariness when the rigors of war get to them—when the track is filled up, or when the MC is willing to let them remove all their weariness, they make a move representing the effects of weariness on them
  • Characters also track camaraderie to show how close they have become to other characters in the war effort
  • Weariness is often used as a consequence of various moves, such as turning down a request from another player
  • Camaraderie is used instead of the “Help” move of some other Powered by the Apocalypse games, spent to boost the roll of another character when they attempt to do something
  • If a character has Camaraderie with a character that dies, and a PC performs the Delivers a Eulogy move, Camaraderie with the fallen can be converted to Experience or Jaded, depending on how each character wants to view their state when the Eulogy was delivered

I really like the economy that is set up with Camaraderie, Jaded, and Weary. They play into the feeling of an ongoing battle against oppressive evil extremely well.

Using Camaraderie as a currency for helping is more exciting, to me, than just having a help move, and it reinforces the need to rebuild more of it between characters. Being able to cash it in for advancement currency, and the fact that it can be gained with NPCs, gives PCs a reason to get invested in characters outside of the immediate circle of the PCs and their commanders.

Jaded is a well-executed double-edged sword, allowing a character to learn from their experiences in a way that also shows that they are getting worn down by that knowledge.

The only aspect of the rules, to this point, that doesn’t excite me, is highlighting moves for XP. While slightly different than highlighting stats in other Powered by the Apocalypse games, it is similar enough that it makes me wonder the same thing that I do in games that use highlighting for XP—what does this say about the fiction? XP for failure, saying yes to questions about events that unfolded, and completing mission goals all speak to reinforcing a genre or the core concepts of the game, but I’m not as clear on what highlighting some specific stats or moves reinforces.

Moves, Characters, and Playbooks

The next three sections of the book deal with explaining moves in more depth, explaining what characters in the setting look like, and give the specific details of the playbooks used in this game.

The section on moves will be familiar to someone that has played in a Powered by the Apocalypse game in the past, but it also summarizes the specific moves that are native to this game. The explanation of how moves work and how they are triggered is very clear. I’ve noticed, in the past, that some Powered by the Apocalypse games lean very heavily on using very similar terminology and expressions to the original Apocalypse World rules, and in some cases, that can lead to some confusion when a reader isn’t familiar with the original game.

In this case, while some of the terminology is used again later in the book, the introductory language is very clear, and the repeated phrases and terms end up being useful for consistency with other, similar games, but not too arcane for a new reader to pick up if this is the first exposure they have to a game using the same conceits.

Characters end up choosing from several clans, that may still be dealing with past rivalries, and can add complications to the effort to overturn the Shadow. They can also advance in rank, so that they can choose what order they approach missions in the overall campaign. Players are also presented with their own principles and agendas to keep in mind.

The game uses the following playbooks for the player character options:

  • Bear—The fierce, protective, and maternal character
  • Eagle—The glory seeking, high-ego character
  • Fox—The mystical, spiritual character
  • Lioness—The charismatic and inspiring character
  • Owl—The sneaky troublemaker character
  • Raven—The philosophical and potentially religious character
  • Spider—The creepy, mysterious one that might poke around with dark powers
  • Wolf—The aggressive, pack-oriented character

Some of the playbooks pick up some supernatural flavor, but powers tend to be more mystical and subtle, rather than overt and offensive. You can seek answers or travel through the spirit realm, but not throw fire and lightning around.

At the end of each playbook summary, there is an explanation of how to play the character, as well as some elaboration on how to use the moves specific to that playbook. I like the added context, but there are a few moves that feel like the actual move description could have been clearer, rather than being fleshed out in the explanation at the end of the playbook—mainly because it might not be obvious that there is more of an explanation of that move outside of the move itself.

MC

The next section in the book, after the player facing information, is directed at the MC. This section details what the game is about broadly, then goes into the agenda and principles of the game.

While it is touched on earlier in the book, this section opens with a clear discussion that the game is about taking the standard fantasy trope of banding disparate people together to fight a great, powerful evil, and viewing that through the lens of the great and powerful evil being the patriarchy.

The MC agenda is spelled out, as well as the principles for running the game. For anyone unfamiliar with a Powered by the Apocalypse game, these are bullet pointed ideas to keep in mind to help reinforce the theme of the game and to keep it moving in the right direction. For each of the agendas and principles, there is a more detailed section explaining what those agendas and principles look like when put into action in a game.

Typical adversaries for the campaign are explained. This includes not just the being corrupted by the Shadow, but also traditionalists and ultra-radicals in the clans that might undermine victory against the Shadow. There is also a section where MCs will define the traits and specific goals of the Shadow, with the Shadow picking up more goals as the PCs get closer to defeating it. Those goals may make the Shadow more dangerous, but also more reckless, as it gets closer to losing its hold on the world.

The potential issues of running a game with the themes being employed is also addressed again in this section. It is stressed that the oppression being highlighted should not involve sexual assault—it’s about how aggression, systematic oppression, extreme competition, and status undermines society. There is also some recommended reading for better understanding and sensitivity about the issues touched on in the game.

The way the MC’s job is expressed in this section is clear, but there are some elements that I felt could have been streamlined. Instead of the traditional hard/soft move split (usually having something dramatic happen versus explaining to the players that something dramatic is about to happen, depending on the actions they take next), the text goes into separate explanations of moves split into the following categories:

  • Softest
  • Soft
  • Hard
  • Hardest

I’m not sure splitting hairs and adding that level of granularity does much for running the game. In fact, a lot of new MCs in Powered by the Apocalypse games need to get used to the concept of making hard and soft moves, and the added layers that have fuzzy boundaries don’t seem to yield much additional value.

Principles, in many Powered by the Apocalypse games, are relatively few and concise. The Watch has 14 principles, some of which are fairly long. They aren’t easy to call to mind or quote from memory. Many of them feel as if they dovetail with one another, and some of them feel like general advice for running games, instead of things to keep top of mind for reinforcing the tone and pacing of The Watch, specifically.

If the MC is using the MC moves, as they are expressed, they will naturally do some of the things that are spelled out in the principles, which means some of those principles could be folded back into other principles. For example, “Keep Clan Politics an Ongoing Problem” is a principle, but one of the GM moves is “Bring Clan Politics into It,” so couldn’t we roll that principle into “Think About What’s Going on All Over the Nation?”

Missions

This section of the rules spells out how a campaign will work. Campaigns are split into separate phases, and are designed to show how the world changes as the Shadow is challenged, and how the stakes are raised as time goes on.

Each phase of the war against the Shadow has several missions under it. There is one mission that “ends” that phase, which cannot be undertaken until most of the missions on the list for that phase have been completed. This allows the players and the MC to decide if they want to tackle all of the missions, or just a majority of them, before brining that phase to a close.

There are mission specific moves that are described by the player that is fulfilling a specific role, and they describe how that character will complete an aspect of the mission. Complications can arise from a 7-9 on mission rolls, such as having something following the players back to their home base after they have conducted a mission—this will require them to deal with the fallout of those complications.

In the final phase of the campaign, there are more dramatic complications that kick in, and in the middle and at the end of the campaign, there are “Changing the World” moves. These moves involve the players naming something they want to see change in the world, and how they are attempting to change that aspect of the world. Their rolls will show if that change is happening, if it is happening globally, or if change is limited to individual clans and regions.

I love this structure for this style of campaign. It would have been easy to set up the playbooks and the world and the advancements, and tracking everything that gets tracked, and then just leave it up to the MC to play as long as they want to resolve the story. In this case, however, there is a structured progression with built in rules to model the higher stakes as the player characters get closer to saving the world. Some games lay out a lot of tools to play an epic campaign, but if feels as if you are missing some of the steps to get from the beginning to the middle. Here the steps are laid out as well.

If there is one aspect of this campaign structure that I wish were handled differently, it is the broad wording of the Changing the World move. I wish it had a bit more guidance on the kinds of social issues that might still be present in the Clans, outside of the Shadow’s influence, so that it’s not quite so wide open for the MC and players to need to invent problems to solve. Keeping Clan politics in the forefront, and as a source of friction might help to generate the fiction needed to make this move work, but examples and guides are always nice.

Final Thoughts, Appendix A, and Index The theme of this game is so important to modern society that it can’t be understated, but the way in which the theme is summarized for a fantasy setting makes it very approachable and understandable when mapped to standard fantasy tropes. 

There is a nice rundown of how to cut down the initial character creation and setup to facilitate running The Watch as a one-shot game, explaining how to prioritize, cut out, and summarize the first session checklist provided earlier in the book.

There is also a separate moves index aside from the overall index, for quick reference.

Leading the Charge

The theme of this game is so important to modern society that it can’t be understated, but the way in which the theme is summarized for a fantasy setting makes it very approachable and understandable when mapped to standard fantasy tropes. In addition to the execution of important themes, the structure of how to run a war against an evil overlord in an epic fantasy setting is something that will be worthwhile for a wide range of GMs to look at.

The Fog of War

While the initial explanations are clear and on point, the specific MC advice gets a little muddy in the middle of the book, with some principles that don’t summarize as well as they could, and some expansion of what hard and soft moves are, without gaining much from that expansion.

Recommended—If the product fits in your broad area of gaming interests, you are likely to be happy with this purchase.

This game is worth checking out for a wide range of gamers. It addresses some very important topics utilizing tropes that are almost universally familiar. It uses Powered by the Apocalypse inspired rules in a manner that expresses the rigors of war, the progression of a campaign, and escalating stakes.

Let me know what you think of The Watch, epic fantasy warfare, and what you might want to see in upcoming reviews. I’ll look forward to your comments, and I hope to get the chance to discuss this and other reviews with you.

Categories: Game Theory & Design

Agiledrop.com Blog: AGILEDROP: 2017 in review

Planet Drupal - 9 January 2018 - 2:50am
Happy new year! Here at AGILEDROP, we will remember 2017 as the year when we became more focused and systemised. We worked hard, learned new things and had fun, lots of fun. Along with the growth in personnel and revenue, I can say it was a good year.     New business model, new processes At the end of 2016, we changed our business model and moved away from being a full-service agency to become trusted partners with digital agencies in building Drupal websites. With great foundations from 2016, we started tweaking processes and documenting them. To become more productive we also… READ MORE
Categories: Drupal

Droptica: Droptica: Summary of the year 2017 in Droptica

Planet Drupal - 9 January 2018 - 2:42am
Another year is over, and we are glad to acknowledge that we are very proud of what happened during this period! In short, 2017 was the best year in the company’s five-year history. That is why we decided to share a brief summary of the year with you. See what we achieved over the last 12 months and what we have in store for 2018.    Reasons to be proud
Categories: Drupal

Amazee Labs: Extending GraphQL: Part 3 - Mutations

Planet Drupal - 9 January 2018 - 2:20am
Extending GraphQL: Part 3 - Mutations

The graphql_core module bundled with the graphql module automatically exposes types and fields to traverse Drupal’s entity system. However, since beta 1 it does not do the same for mutations anymore. The fact that it is not possible to write or update data using GraphQL caused much confusion. I want to shed light on this topic and explain the way mutations are intended to work.

Philipp Melab Tue, 01/09/2018 - 11:20

Before releasing the first beta version of the GraphQL module for Drupal, we removed a feature that automatically added input types and mutation fields for all content entities in the GraphQL schema. This may seem to be counter-intuitive, but there were ample reasons.

Why automatic mutations were removed

While GraphQL allows the client to freely shape query and response, mutations (create, update or delete operations) are by design atomic. A mutation is a root level field that is supposed to accept all necessary information as arguments and return a queryable data object, representing the state after the operation. Since GraphQL is strictly typed, this means that there is one mutation field and one distinct input type for every entity bundle. Also, because Drupal entities tend to have a lot of fields and properties, this resulted in very intricate and hard to use mutations, increasing the schema size, even though  90% of them were never used. 

On top of that, some entity structures added additional complexities: For example, just trying to create an article with a title and a body value while the comment module is enabled results in a constraint violation, as the comment field requires an empty list of comments at the least. 

These circumstances led to a technically correct solution that unfortunately burdened the client with too much knowledge about Drupal internals and was therefore not usable in practice. It became apparent that this had to break and change in the future. Now, because we removed it, the rest of the GraphQL API can become stable. The code is still available on Github for reference and backwards compatibility, but there are no plans to maintain this further.

How to use mutations

So there is no way to use mutations out of the box. You have to write code to add a mutation, but that doesn’t mean it’s complicated. Let’s walk through a simple example. All code is available in the examples repository.

First, you have to add an input type that defines the shape of the data you want your entity mutation to accept:

<?php namespace Drupal\graphql_examples\Plugin\GraphQL\InputTypes; use Drupal\graphql\Plugin\GraphQL\InputTypes\InputTypePluginBase; /** * The input type for article mutations. * * @GraphQLInputType( * id = "article_input", * name = "ArticleInput", * fields = { * "title" = "String", * "body" = { * "type" = "String", * "nullable" = "TRUE" * } * } * ) */ class ArticleInput extends InputTypePluginBase { }

 

This plugin defines a new input type that consists of a “title” and a “body” field.

The first mutation plugin is the “create” operation. It extends the CreateEntityBase class and implements only one method, which will map the properties of our input type (above) to the target entity type and bundle, as defined in the annotation.

<?php namespace Drupal\graphql_examples\Plugin\GraphQL\Mutations; use Drupal\graphql\GraphQL\Type\InputObjectType; use Drupal\graphql_core\Plugin\GraphQL\Mutations\Entity\CreateEntityBase; use Youshido\GraphQL\Execution\ResolveInfo; /** * Simple mutation for creating a new article node. * * @GraphQLMutation( * id = "create_article", * entity_type = "node", * entity_bundle = "article", * secure = true, * name = "createArticle", * type = "EntityCrudOutput", * arguments = { * "input" = "ArticleInput" * } * ) */ class CreateArticle extends CreateEntityBase { /** * {@inheritdoc} */ protected function extractEntityInput(array $inputArgs, InputObjectType $inputType, ResolveInfo $info) { return [ 'title' => $inputArgs['title'], 'body' => $inputArgs['body'], ]; } }

 

The base class handles the rest. Now you already can issue a mutation using the GraphQL Explorer:

The mutation will return an object of type EntityCrudOutput that already contains any errors or constraint violations, as well as - in case the operation was successful - the newly created entity.

If you try to create an article with an empty title, typed data constraints will kick in, and the mutation will fail accordingly:

The update mutation looks almost the same. It just requires an additional argument id that contains the id of the entity to update and extends a different base class.

<?php namespace Drupal\graphql_examples\Plugin\GraphQL\Mutations; use Drupal\graphql\GraphQL\Type\InputObjectType; use Drupal\graphql_core\Plugin\GraphQL\Mutations\Entity\UpdateEntityBase; use Youshido\GraphQL\Execution\ResolveInfo; /** * Simple mutation for updating an existing article node. * * @GraphQLMutation( * id = "update_article", * entity_type = "node", * entity_bundle = "article", * secure = true, * name = "updateArticle", * type = "EntityCrudOutput", * arguments = { * "id" = "String", * "input" = "ArticleInput" * } * ) */ class UpdateArticle extends UpdateEntityBase { /** * {@inheritdoc} */ protected function extractEntityInput(array $inputArgs, InputObjectType $inputType, ResolveInfo $info) { return array_filter([ 'title' => $inputArgs['title'], 'body' => $inputArgs['body'], ]); } }

 

Now you should be able to alter any articles:

And the delete mutation is even simpler.

<?php namespace Drupal\graphql_examples\Plugin\GraphQL\Mutations; use Drupal\graphql_core\Plugin\GraphQL\Mutations\Entity\DeleteEntityBase; /** * Simple mutation for deleting an article node. * * @GraphQLMutation( * id = "delete_article", * entity_type = "node", * entity_bundle = "article", * secure = true, * name = "deleteArticle", * type = "EntityCrudOutput", * arguments = { * "id" = "String" * } * ) */ class DeleteArticle extends DeleteEntityBase { }

 

This will delete the entity, but it’s still available in the response object, for rendering notifications or for subsequent queries.

That’s a wrap. With some trivial code, we can implement a full CRUD interface for an entity type. If you need multiple entity types, you could use derivers and services to make it more DRY.

Plans

This way we can create entity mutations that precisely fit the needs of our current project. It requires a little boilerplate code and might not be the most convenient thing to do, but it’s not terrible and works for now.

That doesn’t mean we are not planning to improve. Currently, the rules module is our best hope for providing zero-code, site-building driven mutations. The combination would be tremendously powerful.

If you want out-of-the-box mutations in GraphQL, go and help with #d8rules!

Categories: Drupal

Classic Tools Retrospective: Tim Sweeney on the first version of the Unreal Editor - by David Lightbown

Gamasutra.com Blogs - 9 January 2018 - 1:04am
Tim Sweeney talks to David Lightbown about UnrealEd, one of the most popular level editors in the games industry, which was used to build levels for Unreal, Deus Ex, Gears of War, BioShock, Rainbow Six, Splinter Cell, and Mass Effect, and many, many more.
Categories: Game Theory & Design

Pages

Subscribe to As If Productions aggregator