1.0.7 • Published 6 years ago

smallorange-graphql-mux v1.0.7

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

CircleCI

Usage

	const http = json => fetch('http://yourGraphQLEndpoint.com', {
		method: 'POST',
		cache: 'no-store',
		headers: {
			'content-type': 'application/json'
		},
		body: JSON.stringify(json)
	});
	
	const queue = new GraphQLMux(http, 'query', 10);
	
	queue.graphql({
		requestString: `query($user: String!) {
			user(id: $user) {
				name
			}
		}`,
		variableValues: {
			user: 'user'
		}
	})
	.then(...);
	
	queue.graphql({
		requestString: `query(order: String!) {
			order(id: $order) {
				date
				total
			}
		}`,
		variableValues: {
			order: 'order'
		}
	})
	.then(...);
1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago