We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The Lokka docs provide the following example of how to make and use a fragment:
const filmInfo = client.createFragment(` fragment on Film { title, director, releaseDate } `); client.query(` { allFilms { films { ...${filmInfo} } } } `).then(result => { console.log(result.allFilms.films); });
But you can do the same thing much more simply:
const filmInfo = ` title, director, releaseDate`; // The rest of the code remains the same except: // ...${filmInfo} // becomes: ${filmInfo}
It's unclear to me what the benefit of using client.createFragment is. Even a sentence or two in the docs about that would be helpful.
client.createFragment
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The Lokka docs provide the following example of how to make and use a fragment:
But you can do the same thing much more simply:
It's unclear to me what the benefit of using
client.createFragment
is. Even a sentence or two in the docs about that would be helpful.The text was updated successfully, but these errors were encountered: