fetch failed to http://localhost:1337/graphql
Closed this issue · 1 comments
Flowko commented
i have strapi running at http://localhost:1337 but somehow it doesnt work, im using 4.5.4
Info: Generating types from GraphQL at http://localhost:1337/graphql.
(node:8490) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11118:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async UrlLoader.load (/Users/project/website/node_modules/@graphql-tools/url-loader/cjs/index.js:211:29)
at async /Users/project/website/node_modules/@graphql-tools/load/index.js:75:39
at async Promise.all (index 0)
at async loadFile (/Users/project/website/node_modules/@graphql-tools/load/index.js:73:9)
at async /Users/project/website/node_modules/@graphql-tools/load/index.js:386:25 {
message: 'fetch failed to http://localhost:1337/graphql',
path: undefined,
locations: undefined,
extensions: {
requestBody: {
query: 'query IntrospectionQuery {\n' +
' __schema {\n' +
' queryType {\n' +
' name\n' +
' }\n' +
' mutationType {\n' +
' name\n' +
' }\n' +
' subscriptionType {\n' +
' name\n' +
' }\n' +
' types {\n' +
' ...FullType\n' +
' }\n' +
' directives {\n' +
' name\n' +
' description\n' +
' locations\n' +
' args {\n' +
' ...InputValue\n' +
' }\n' +
' }\n' +
' }\n' +
'}\n' +
'\n' +
'fragment FullType on __Type {\n' +
' kind\n' +
' name\n' +
' description\n' +
' fields(includeDeprecated: true) {\n' +
' name\n' +
' description\n' +
' args {\n' +
' ...InputValue\n' +
' }\n' +
' type {\n' +
' ...TypeRef\n' +
' }\n' +
' isDeprecated\n' +
' deprecationReason\n' +
' }\n' +
' inputFields {\n' +
' ...InputValue\n' +
' }\n' +
' interfaces {\n' +
' ...TypeRef\n' +
' }\n' +
' enumValues(includeDeprecated: true) {\n' +
' name\n' +
' description\n' +
' isDeprecated\n' +
' deprecationReason\n' +
' }\n' +
' possibleTypes {\n' +
' ...TypeRef\n' +
' }\n' +
'}\n' +
'\n' +
'fragment InputValue on __InputValue {\n' +
' name\n' +
' description\n' +
' type {\n' +
' ...TypeRef\n' +
' }\n' +
' defaultValue\n' +
'}\n' +
'\n' +
'fragment TypeRef on __Type {\n' +
' kind\n' +
' name\n' +
' ofType {\n' +
' kind\n' +
' name\n' +
' ofType {\n' +
' kind\n' +
' name\n' +
' ofType {\n' +
' kind\n' +
' name\n' +
' ofType {\n' +
' kind\n' +
' name\n' +
' ofType {\n' +
' kind\n' +
' name\n' +
' ofType {\n' +
' kind\n' +
' name\n' +
' ofType {\n' +
' kind\n' +
' name\n' +
' }\n' +
' }\n' +
' }\n' +
' }\n' +
' }\n' +
' }\n' +
' }\n' +
'}',
variables: undefined,
operationName: undefined,
extensions: undefined
}
}
}
Flowko commented
used http://0.0.0.0:1337
instead of localhost:1337 seems to solve it