FormidableLabs / FormidableLabs/groqd

Potential gaps in 0.x to 1.x migration guide

Open
#337 7 comments 1 reaction 0 assignees View on GitHub
documentation groqd-v0-legacy groqd-v1 migration-to-v1
Dominant language
TypeScript
Stars
293
Forks
15
PR merge metrics
No merged PRs in 30d

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

### Question

Hi there,

Thanks for the work on this.

I'm inheriting a project from another agency and they're using groqd 0.x.

I'm looking to migrate to 1.x but struggling on a couple areas, and I can't see guidance on migrating them in the current 0.x to 1.x guide.

I wanted to note a few things that seem to be missing, and ask for advice on migrating them:

- How to migrate from the previously exported `sanityImage`. Is the expectation to write our own fragment for this now? All good if so, I just can't find an answer in the docs. [I looked here](https://github.com/FormidableLabs/groqd/issues/332) but seems there's currently still an issue so wasn't sure what I should be doing
- I've seen uses of `q("").grab$()` in the codebase. Does this now become just `q.project()`?
- Similarly I've seen `.filter()`, however `filter()` requires now 1 parameter—how is this migrated? E.G. from the old docs `q("types").filter().deref().grab({ name: q.string() }),`
- This code also imports some types: `Selection`, `InferType` and `TypeFromSelection`, which are no longer exported. What's the migration path for these?

I apologise if any of these should be obvious. I'm new to Groqd.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.