Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

up mode a File change detected exception #134

Closed
AnsonCode opened this issue Aug 22, 2022 · 1 comment
Closed

up mode a File change detected exception #134

AnsonCode opened this issue Aug 22, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@AnsonCode
Copy link

AnsonCode commented Aug 22, 2022

Bug description

up mode accur File change detected exception

How to reproduce

  1. Go to '.wundergraph'
  2. Run 'wunderctl up --debug --listen-addr 0.0.0.0:9991'
  3. See error
2022-08-22T17:26:09+08:00       debug   File change detected    {"watcherName": "config", "paths": ["/home/admin/app/start/wundergraph/.wundergraph/generated/wundergraph.config.json"]}
  1. There is an infinite loop

Expected behavior

No response

WunderGraph information

/.wundergraph/wundergraph.config.ts

import {
    Application,
    authProviders,
    configurePublishWunderGraphAPI,
    configureWunderGraphApplication,
    cors,
    introspect,
    templates
} from '@wundergraph/sdk';
import server from './wundergraph.server';
import operations from './wundergraph.operations';

const weather = introspect.graphql({
    apiNamespace: "weather",
    url: "https://graphql-weather-api.herokuapp.com/",
});



const myApplication = new Application({
    name: 'app',
    apis: [weather,],
});

// configureWunderGraph emits the configuration
configureWunderGraphApplication({
    application: myApplication,
    server,
    operations,
    authentication:{} ,
    authorization: {roles:["admin","user"]} ,
    cors: {        ...cors.allowAll, allowedOrigins:["localhost:3000"],allowedHeaders:[""],exposedHeaders:[""],maxAge:60 },
    security: {enableGraphQLEndpoint:true} ,
    dotGraphQLConfig: {
            hasDotWunderGraphDirectory: false,
    },
    codeGenerators: [
            {
                templates: [
                    // use all the typescript react templates to generate a client
                    ...templates.typescript.all,
                    templates.typescript.operations,
                    templates.typescript.linkBuilder,
                ],
                // create-react-app expects all code to be inside /src
                // path: "../frontend/src/generated",
            },
    ],
});

/.wundergraph/wundergraph.operations.ts

import { configureWunderGraphOperations } from '@wundergraph/sdk';
import type { OperationsConfiguration } from './generated/wundergraph.operations';

export default configureWunderGraphOperations<OperationsConfiguration>({
	operations: { 
		defaultConfig:{authentication:{required:false}},
		queries: (config) => ({  
			...config,
			caching : {enable:true,staleWhileRevalidate:2,maxAge:2,public:false},
			liveQuery: {enable:false,pollingIntervalSeconds:0},
		}),
 		mutations: (config) => ({
            ...config,
        }),
        subscriptions: (config) => ({
            ...config,
        }),
	 custom: { }, },
});

/.wundergraph/wundergraph.server.ts

import {GraphQLObjectType, GraphQLSchema, GraphQLString} from 'graphql';
import {configureWunderGraphServer} from '@wundergraph/sdk';
import type {AuthenticationResponse, HooksConfig} from './generated/wundergraph.hooks';
import type {InternalClient} from './generated/wundergraph.internal.client';

   

export default configureWunderGraphServer<HooksConfig, InternalClient>(() => ({
   hooks:{  authentication: {
				
            },  }, graphqlServers: [] 
}));

Environment & setup

  • OS:
  • Go version:
  • Database:
  • Node.js version:

WunderCtl Version

Version: 0.94.5
Commit: 7b5e6108ec00cb5de98235f33c07b612415dc346
Date: 2022-07-18T09:13:16Z
BuiltBy: ci
@AnsonCode AnsonCode added the bug Something isn't working label Aug 22, 2022
@YuriBuerov
Copy link
Contributor

Fixed in @wundergraph/sdk@0.114.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants