I added a new text field "agency" to our "project" custom type. I can see the new field in all the project documents. I also see the new field in the types generated by prismic-ts-codegen:
/**
* Agency field in *Project*
*
* - **Field Type**: Text
* - **Placeholder**: *None*
* - **API ID Path**: project.agency
* - **Tab**: Main
* - **Documentation**: https://prismic.io/docs/field#key-text
*/
agency: prismic.KeyTextField;
When I try to query all the projects with the agency field specified in the "GraphQL" query, see below, I get a CORS error. If I remove the agency field from the query (like it was before), no issues. It's like the prismic server is unaware of the new field on the project type when quuerying (although prismic-ts-codegen had no issues generating the updated types).
Here is the query for reference:
client.getAllByType('project', {
graphQuery: `{
project {
title
short_description
top_description
sort
standalone
tags {
tag {
...on project_tag {
tag
}
}
}
cover
client
agency
services
description
video
related_projects {
project {
title
cover
client
services
}
}
}
}`
})