This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Input looks like | |
{ | |
"input": { | |
"name": "A new test" | |
} | |
} | |
""" | |
mutation Mutation($input: [TestCreateInput!]!) { | |
createTests(input: $input) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query Query { | |
products { | |
name | |
userStoriesConnection { | |
edges { | |
author | |
node { | |
name | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Product { | |
id: ID! @id | |
name: String | |
userStories: [UserStory!]! @relationship(type: "DEFINES", properties: 'Defines', direction: IN) | |
} | |
type Mockup { | |
id: ID! @id | |
name: String | |
nodeId: String | |
userStories: [UserStory!]! @relationship(type: "VISUALISES", direction: OUT) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query Query { | |
products { | |
id | |
name | |
} | |
mockups { | |
id | |
name | |
} | |
userStories { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Product { | |
id: ID! @id | |
name: String | |
} | |
type Mockup { | |
id: ID! @id | |
name: String | |
nodeId: String | |
} | |
type UserStory { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create Product | |
CREATE (ChocolateBox:Product {id: 'PRODUCT-1', name:'Chocolate Box'}) | |
// Create Figma mockups | |
CREATE (LandingPage:Mockup {id: 'MOCKUP-1', name:'Landing Page', nodeId:'424:1224'}) | |
CREATE (ChocolatePLP:Mockup {id: 'MOCKUP-2', name:'Chocolate PLP', nodeId:'424:1233'}) | |
CREATE (FlowerPLP:Mockup {id: 'MOCKUP-4', name:'Flower PLP', nodeId:'424:1242'}) | |
// Create User Stories | |
CREATE (ViewFlowersList:UserStory {id:'USER-STORY-1', name:'Customer Views Flowers Product List'}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { gql, ApolloServer } from 'apollo-server' | |
import { Neo4jGraphQL } from '@neo4j/graphql' | |
import neo4j from 'neo4j-driver' | |
const typeDef = gql``; // Type Defs for schema | |
const driver = neo4j.driver( | |
'http://localhost:7687', // Bolt URL for Neo4J | |
neo4j.auth.basic('neo4j', 's3cr3t') // Username & password for Neo4J | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.js | |
import {emit, on, once, showUI, loadSettingsAsync, saveSettingsAsync} from '@create-figma-plugin/utilities' | |
const defaultPluginState = { | |
foo: 'bar' | |
} | |
export default function () { | |
on('SAVE_PLUGIN_STATE', async (pluginState) => { | |
await saveSettingsAsync(pluginState, 'PLUGIN_STATE') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.js | |
import {emit, showUI} from '@create-figma-plugin/utilities' | |
export default function () { | |
figma.on('selectionchange', () => { | |
// convert current selection to nodes (passing raw SceneNode would result in just node ID being passed) | |
const nodes = figma.currentPage.selection.map((node) => { | |
return { | |
id: node.id, | |
name: node.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.js | |
import {on, showUI} from '@create-figma-plugin/utilities' | |
export default function () { | |
on('HIDE_ALL', (args) => { | |
const allNodes = figma.currentPage.children.slice() | |
allNodes.map((node) => { | |
node.visible = false | |
}) | |
figma.closePlugin() |