# See http://clarkgrubb.com/makefile-style-guide MAKEFLAGS += --warn-undefined-variables SHELL := bash .SHELLFLAGS := -eu -o pipefail -c .DEFAULT_GOAL := all .DELETE_ON_ERROR: .SUFFIXES: include .env .PHONY: all all: supergraph add-context .PHONY: supergraph supergraph: -@echo "-> $@" rover supergraph compose --config config.yaml > superschema.graphql # .PHONY: add-context add-context: -@echo "-> $@" @echo -e "\n\n$$(cat ext/in_context.graphql)" >> superschema.graphql @sed 's/type Query/type Query\n @inContext/' superschema.graphql > prod.graphql @cp prod.graphql superschema.graphql @sed 's/type Mutation/type Mutation\n @inContext/' superschema.graphql > prod.graphql @rm superschema.graphql