Skip to content

Instantly share code, notes, and snippets.

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

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
export default {
Query: () => ({
keywordsByLocationId: () => new MockList(10),
listingsForLocation: () => new MockList(20),
duplicatesForLocation: () => new MockList(20),
}),
Mutation: () => ({
addKeywords: (root, args) => ({
ok: true,
keywords: addKeywordsResolver(args),
// 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';