I’m struggling setting up an iOS client using the latest 1.0 documentation. I’ve installed the CLI on Xcode 14.2 and am trying to set up the config and run code generation.
I’m getting the error:
Error: A GraphQL schema could not be found. Please verify the schema search paths.
I’m not quite following the documentation here: what should be the namespace provided if my project has only a single target and the schema.json is in my project’s root folder?
Does anyone have an example project and config setup they can share?
Hi @nbgkls2000 welcome to the forum! Can you share some relevant configuration details? The value for schemaPath
would be the first thing I’d recommend checking.
1 Like
Hey Jeff! I’m following these instructions here and there is no mention of a value called schemaPath.
This is the config file that was initalized by the Apollo CLI which I haven’t touched. Do you see anything wrong with this? Really appreciate the help!
{
"schemaNamespace" : "my-app",
"input" : {
"operationSearchPaths" : [
"**/*.graphql"
],
"schemaSearchPaths" : [
"**/*.graphqls"
]
},
"output" : {
"testMocks" : {
"none" : {
}
},
"schemaTypes" : {
"path" : "./my-app",
"moduleType" : {
"embeddedInTarget" : {
"name" : "my-app"
}
}
},
"operations" : {
"inSchemaModule" : {
}
}
}
}
@nbgkls2000 what happens when you add "**/schema.json"
to your schemaSearchPaths
array?
@nbgkls2000 how do you fix this issue?