Skip to content

Commit

Permalink
Merge pull request #1846 from artsy/copy-v1-to-v2
Browse files Browse the repository at this point in the history
Duplicate V2
  • Loading branch information
alloy committed Jul 25, 2019
2 parents cc180e3 + 0a32af3 commit 5782004
Show file tree
Hide file tree
Showing 539 changed files with 42,900 additions and 131 deletions.
3 changes: 2 additions & 1 deletion src/lib/stitching/convection/__tests__/stitching.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { incrementalMergeSchemas } from "../../mergeSchemas"
import { graphql } from "graphql"
import gql from "lib/gql"
import { addMockFunctionsToSchema } from "graphql-tools"
import schema from "schema/v1/schema"

it("resolves an Artist on a Consignment Submission", async () => {
const allMergedSchemas = await incrementalMergeSchemas({
const allMergedSchemas = await incrementalMergeSchemas(schema, {
ENABLE_CONSIGNMENTS_STITCHING: true,
})

Expand Down
3 changes: 1 addition & 2 deletions src/lib/stitching/mergeSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { executableKawsSchema } from "lib/stitching/kaws/schema"
import { kawsStitchingEnvironment } from "lib/stitching/kaws/stitching"
import config from "config"

import localSchema from "schema/v1/schema"
import { GraphQLSchema } from "graphql"
import { exchangeStitchingEnvironment } from "./exchange/stitching"
import { executableVortexSchema } from "lib/stitching/vortex/schema"
Expand All @@ -19,7 +18,7 @@ import { vortexStitchingEnvironment } from "./vortex/stitching"
/**
* Incrementally merges in schemas according to `process.env`
*/
export const incrementalMergeSchemas = (testConfig?: any) => {
export const incrementalMergeSchemas = (localSchema, testConfig?: any) => {
const environment = testConfig || config

const {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/article.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("Article type", () => {
let article = null
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/articles.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("Articles type", () => {
let context = null
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/artists.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"
import { find } from "lodash"

Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/artworkAttributionClasses.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("ArtworkAttributionClasses type", () => {
it("fetches artworkAttributionClasses", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/auction_results.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

const artist = {
id: "percy-z",
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/causality_jwt.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable promise/always-return */
import jwt from "jwt-simple"
import { omit } from "lodash"
import { runQuery, runAuthenticatedQuery } from "test/utils"
import { runQuery, runAuthenticatedQuery } from "schema/v1/test/utils"
import config from "config"

const { HMAC_SECRET } = config
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/city.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jest.mock("../city/cityDataSortedByDisplayPreference.json", () => mockCities)
jest.mock("lib/all.ts")
jest.mock("lib/sponsoredContent/data.json", () => mockSponsoredContent)

import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"
import { MAX_GRAPHQL_INT, allViaLoader as _allViaLoader } from "lib/all"

Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/collection.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from "path"
import { readFileSync } from "fs"
import { runAuthenticatedQuery } from "test/utils"
import { runAuthenticatedQuery } from "schema/v1/test/utils"
import gql from "lib/gql"
import { isEqual } from "lodash"

Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/credit_card.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("CreditCard type", () => {
let creditCard: any
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/offer_order.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import gql from "lib/gql"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import gql from "lib/gql"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import gql from "lib/gql"
import { OrderBuyerFields } from "./order_fields"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"

let context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import gql from "lib/gql"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/ecommerce/order.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable promise/always-return */

import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/ecommerce/orders.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable promise/always-return */

import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrdersJSON from "test/fixtures/exchange/orders.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import gql from "lib/gql"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import gql from "lib/gql"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import gql from "lib/gql"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
import { sampleOrder } from "test/fixtures/results/sample_order"
import exchangeOrderJSON from "test/fixtures/exchange/buy_order.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { sampleOrder } from "test/fixtures/results/sample_order"
import gql from "lib/gql"
import { mockxchange } from "test/fixtures/exchange/mockxchange"
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/fair.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const mockSponsoredContent = {
jest.mock("lib/sponsoredContent/data.json", () => mockSponsoredContent)

/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"
import moment from "moment"

Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/fairs.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"

describe("Fairs", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/filter_artworks.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import { toGlobalId } from "graphql-relay"

describe("Filter Artworks", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/filter_sale_artworks.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("Filter Sale Artworks", () => {
let context = null
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/gene.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import trackedEntityLoaderFactory from "lib/loaders/loaders_with_authentication/tracked_entity"

describe("Gene", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/gene_families.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("GeneFamilies", () => {
const api_data = [
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/genes.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { find } from "lodash"
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"

describe("Genes", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/object_identification.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable promise/always-return */
import _ from "lodash"
import { toGlobalId } from "graphql-relay"
import { runQuery, runAuthenticatedQuery } from "test/utils"
import { runQuery, runAuthenticatedQuery } from "schema/v1/test/utils"

describe("Object Identification", () => {
// TODO As we add more loaders, remove the old tests at the bottom of this file and add them here.
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/ordered_set.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("OrderedSet type", () => {
it("fetches set by id", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/ordered_sets.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("OrderedSets type", () => {
const query = `
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/partner.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"

describe("Partner type", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/partner_show.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable promise/always-return */
import moment from "moment"
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("PartnerShow type", () => {
let showData = null
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/partner_show_events.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"
import moment from "moment"
import { ResolverContext } from "types/graphql"
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/partner_shows.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable promise/always-return */

import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"

describe("PartnerShows type", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/partners.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"
import gql from "lib/gql"

describe("Partners", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/profile.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("Profile type", () => {
let profileData = null
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/sale_artwork.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { runAuthenticatedQuery, runQuery } from "test/utils"
import { runAuthenticatedQuery, runQuery } from "schema/v1/test/utils"

describe("SaleArtwork type", () => {
const saleArtwork = {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/sale_artwork_max_bid_env.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import config from "config"
// This is the key to this one file:
config.BIDDER_POSITION_MAX_BID_AMOUNT_CENTS_LIMIT = 400000

import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("SaleArtwork type", () => {
const saleArtwork = {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/sale_artworks.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from "lodash"
import gql from "lib/gql"
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("Sale Artworks", () => {
const execute = async (gravityResponse, query, context = {}) => {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/search.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runQuery } from "test/utils"
import { runQuery } from "schema/v1/test/utils"

describe("Search", () => {
let searchResults: any
Expand Down
2 changes: 1 addition & 1 deletion src/schema/v1/__tests__/sendFeedbackMutation.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable promise/always-return */
import { runAuthenticatedQuery } from "test/utils"
import { runAuthenticatedQuery } from "schema/v1/test/utils"

describe("Send Feedback", () => {
const feedback = {
Expand Down

0 comments on commit 5782004

Please sign in to comment.