graphql-tag

Webpack loader for graphql-tag not loading in Angular 8

别来无恙 提交于 2020-02-05 03:31:40
问题 I have been following this guide https://www.apollographql.com/docs/angular/recipes/webpack/ but I am getting this error when I execute ng serve : ERROR in ./src/app/shared/queries.graphql 1:6 Module parse failed: Unexpected token (1:6) You may need anappropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders query supplierByName($value: String) { | Supplier(filter: { name: $value }) { | name Also, when I

Nextjs-Graphql webpack loader: How to integrate Nextjs with Graphql loader

筅森魡賤 提交于 2020-01-15 09:05:43
问题 I am trying to integrate Nextjs with graphql-tag/loader, This is my next.config.js file: const withSass = require('@zeit/next-sass') const graphqlLoader = require('graphql-tag/loader') module.exports = withSass({ webpack: (config, { buildId, dev, isServer, defaultLoaders }) => { config.module.rules.push({ test: /\.(graphql|gql)$/, loader: graphqlLoader, exclude: /node_modules/ }) return config } }) I am unable to build, I get the error below: /HOME/node_modules/graphql-tag/loader.js:43 this

Nextjs-Graphql webpack loader: How to integrate Nextjs with Graphql loader

北城以北 提交于 2020-01-15 09:05:28
问题 I am trying to integrate Nextjs with graphql-tag/loader, This is my next.config.js file: const withSass = require('@zeit/next-sass') const graphqlLoader = require('graphql-tag/loader') module.exports = withSass({ webpack: (config, { buildId, dev, isServer, defaultLoaders }) => { config.module.rules.push({ test: /\.(graphql|gql)$/, loader: graphqlLoader, exclude: /node_modules/ }) return config } }) I am unable to build, I get the error below: /HOME/node_modules/graphql-tag/loader.js:43 this

GraphQL dynamic query building

风流意气都作罢 提交于 2019-12-10 01:44:41
问题 I have a GraphQL server which is able to serve timeseries data for a specified source (for example, sensor data). An example query to fetch the data for a sensor might be: query fetchData { timeseriesData(sourceId: "source1") { data { time value } } } In my frontend, I want to allow the user to select 1 or more sources and show a chart with a line for each one. It seems like this would be possible by using a query like this: query fetchData { series1: timeseriesData(sourceId: "source1") {

GraphQL dynamic query building

人盡茶涼 提交于 2019-12-05 00:44:23
I have a GraphQL server which is able to serve timeseries data for a specified source (for example, sensor data). An example query to fetch the data for a sensor might be: query fetchData { timeseriesData(sourceId: "source1") { data { time value } } } In my frontend, I want to allow the user to select 1 or more sources and show a chart with a line for each one. It seems like this would be possible by using a query like this: query fetchData { series1: timeseriesData(sourceId: "source1") { data { time value } } series2: timeseriesData(sourceId: "source2") { data { time value } } } Most GraphQL