Skip to content

Instantly share code, notes, and snippets.

View jbaxleyiii's full-sized avatar
💼
Moved to management

James Baxley jbaxleyiii

💼
Moved to management
View GitHub Profile
@jbaxleyiii
jbaxleyiii / reviews-extends.graphql
Last active May 29, 2019 13:36
Extends type reviews
extend type User @key(fields: "id") {
id: ID! @external
reviews: [Review]
}
const { ApolloGateway } = require("@apollo/gateway");
const gateway = new ApolloGateway({
serviceList: [
{ name: "accounts", url: "https://pw678w138q.sse.codesandbox.io/graphql" },
{ name: "reviews", url: "https://0yo165yq9v.sse.codesandbox.io/graphql" },
{ name: "products", url: "https://x7jn4y20pp.sse.codesandbox.io/graphql" },
{ name: "inventory", url: "https://o5oxqmn7j9.sse.codesandbox.io/graphql" }
]
});
# accounts
type User @key(fields: "id") {
id: ID!
username: String
}
# reviews service
type Review {
author: User @provides(fields: "username")
}
type Product @key(fields: "upc") @key(fields: "sku") {
upc: String!
sku: String!
}
type User @key(fields: "id organization { id }") {
id: ID!
organization: Organization!
}
@jbaxleyiii
jbaxleyiii / accounts.graphql
Last active May 29, 2019 13:24
Extends type
type User @key(fields: "id") {
id: ID!
username: String
}
@jbaxleyiii
jbaxleyiii / accounts.graphql
Last active June 10, 2019 16:25
reference types
type User @key(fields: "id") {
id: ID!
username: String
}
" ===============================================================
" norma
"
" URL:
" Author: jbaxleyiii
" License: MIT
" Last Change: 2016/11/03 00:26
" ===============================================================
let g:colors_name="norma"

OSS

  • [organizational work]
  • move query planning and execution into apollo-federation package
  • create new apollo-gateway and move over existing gateway minus the sass integration
  • create apollo-gateway-enterprise (or some other name) for enterprise version connected to sass
  • setup docs for gateway
  • transfer docs in quip to docs framework
  • document migration from schema stitching
  • document composition validation errors and warnings
  • document query planner codebase
const { createClient, gql } = require("apollo-server/test-utils");
const { server } = require("../server");
describe("admin user", () => {
let client;
beforeAll(async () => {
// second argument here is the request
client = await createClient(server, ({ req }) => ({
user: {