Skip to content

Instantly share code, notes, and snippets.

View WYSIWYG.org

WYSIWYG Specs

Anatomy of a page

Header

The Header component is common across the locator, individual store pages and the locations by state pages. Usually copied from client’s website.

Footer

The Footer component should also be common across the locator, individual pages

View pr_business_api_docs.md

Adding Voice Assistants & Listings to a location

POST /api/v4/locations

This endpoint used to create a location with voice assistants & individual listings sites enabled.

Example

POST /api/v4/locations
View mocksindex.js
export default {
Query: () => ({
keywordsByLocationId: () => new MockList(10),
listingsForLocation: () => new MockList(20),
duplicatesForLocation: () => new MockList(20),
}),
Mutation: () => ({
addKeywords: (root, args) => ({
ok: true,
keywords: addKeywordsResolver(args),
View mockedClient.js
// mocked schema for tests.
import { ApolloClient, InMemoryCache } from 'apollo-boost';
import { SchemaLink } from 'apollo-link-schema';
import {
addMockFunctionsToSchema,
} from 'graphql-tools';
import { buildClientSchema } from 'graphql';
import * as introspectionResult from './schema.json';
import mocks from '../mocks';