-
Notifications
You must be signed in to change notification settings - Fork 128
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
Cannot query field "align" on type "CoreQuoteAttributes" #1932
Comments
Hey @ttstauss thanks for the report. I will try to reproduce but if that is the case we will have to create a new major version of blocks package since they changed the schema. In the meatime you can still provide your own implementation of CoreQuote by overriding the blocks export key 'CoreQuote' here: https://github.com/wpengine/faustjs/blob/canary/examples/next/block-support/wp-blocks/index.js#L9 |
@ttstauss I ran into this and was able to fix it with the following: my import { CoreBlocks } from '@faustwp/blocks'
import { CoreQuote } from './CoreQuote'
const blocks = {
...CoreBlocks,
CoreQuote,
}
export default blocks Then my file: import { CoreBlocks } from "@faustwp/blocks";
import {gql} from "@apollo/client";
const { CoreQuote: FaustCoreQuote } = CoreBlocks;
export function CoreQuote(props) {
return <FaustCoreQuote {...props} />;
}
CoreQuote.displayName = { ...FaustCoreQuote.displayName };
CoreQuote.config = {
...FaustCoreQuote.config,
name: `CustomCoreQuoteFragment`
};
CoreQuote.fragments = {
key: `CustomCoreQuoteFragment`,
entry: gql`
fragment CustomCoreQuoteFragment on CoreQuote {
attributes {
textAlign
anchor
backgroundColor
citation
className
fontFamily
fontSize
gradient
lock
style
textColor
value
cssClassName
}
}
`
}; |
fwiw, this was caused by a change in core WordPress where an attribute on the block was changed. . .so technically this is a breaking change to WordPress core that was just surfaced by the mapping of blocks to the schema. |
@theodesp and @jasonbahl, this pointed me in the right direction for a fix. Thanks! |
Hi, how are you? I'm encountering the same issue, so I followed the steps that jasonbahl mentioned to fix this. It seems to have worked, but now I'm facing another problem and I'm not sure if it's related to that. |
@emaxees this appears to be unrelated. It looks like you have a query defined in a template with variable Check your wp-templates to see if you are indeed passing variables correctly. Here's an example of a wp-template that defines a query that uses a variable: And passes the variable to the query: |
Description
I'm getting the following error:
This goes away when I remove
@faustwp/blocks
from my project.This appears to be the issue: WordPress/gutenberg@9a80ddd
Steps to reproduce
Additional context
No response
@faustwp/core Version
3.0.3
@faustwp/cli Version
3.0.2
FaustWP Plugin Version
1.3.2
WordPress Version
6.6.1
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.
The text was updated successfully, but these errors were encountered: