Skip to content

Releases: FormidableLabs/groqd

groqd@1.7.1

20 May 15:58
1008850

Choose a tag to compare

Patch Changes

  • filterBy: support multiple expressions. Expressions will be combined using the || "OR" operator. (#387)

groqd@1.7.0

13 May 22:18
fd1288d

Choose a tag to compare

Minor Changes

  • Fix: simplify Fragments types to eliminate "Type instantiation is excessively deep and possibly infinite." errors (#385)

Patch Changes

  • Feature: reduce dependency on Zod to ensure wider compatibility between Zod versions (#385)

groqd@1.6.0

30 Apr 16:40
3c4a93f

Choose a tag to compare

Minor Changes

  • Feature: (#381)
    • Added support for "not equal" expressions (!=).
    • This applies to the .filterBy and .conditional methods

groqd@1.5.0

25 Apr 13:25
0ae0168

Choose a tag to compare

Minor Changes

  • Feature: support "query syntax" in conditionals (#378)
    Feature: support .value(...) and .star at the subquery level

groqd@1.4.0

15 Apr 21:08
1565694

Choose a tag to compare

Minor Changes

  • Feature: in filters, support != null syntax, and added support for comparisons between nullish values (#376)

    Feature: in projections, support ^ parent selector, and @ self selector. For example:

    q.star.filterByType("product").project((sub) => ({
      _type: "_type",
      styles: sub
        .field("styles[]")
        .deref()
        .project((style) => ({
          // Shorthand syntax:
          styleName: "name",
          productName: "^.name", // 👈 here we're selecting the parent name
          styleObject: "@", // 👈 self-selector refers to the entire current object
    
          // 👇 These selectors are also available via `q.field()` syntax:
          productName: q.field("^.name"),
          styleObject: q.field("@"),
        })),
    }));

groqd@1.3.1

14 Apr 19:34
595ee39

Choose a tag to compare

Patch Changes

  • Fix: ensure we can get fields from block and reference objects (#373)

groqd@0.15.13

11 Apr 23:01

Choose a tag to compare

Changelog

0.15.13

Patch Changes

  • Fixed a bug where the q.contentBlock() function would miss blocks whose marks property was omitted or undefined. (#370)

0.15.12

Patch Changes

  • Updated README to fix banner, add Support link (#291)

0.15.11

Patch Changes

  • bump Sanity to 3.15.0. bump vitest to 1.3.1 (#278)

0.15.10

Patch Changes

  • Update zod to resolve security vulnerablity (#233)

  • Use same zod version across all packages (#237)

0.15.9

Patch Changes

  • Addresses #213, allows the .order method to take an array of strings – since order argument can be more complex than just FIELD desc (#214)

0.15.8

Patch Changes

  • Always return a new Class from builder methods, addresses #204. (#211)

0.15.7

Patch Changes

  • update zod to 3.21.4 (#201)

0.15.6

Patch Changes

  • Fix zod version (#193)

0.15.5

Patch Changes

  • ability for sanityImage schema to handle file assets (85f0621)

0.15.4

Patch Changes

  • Add rawResponse on GroqdParseError (#166)

0.15.3

Patch Changes

  • Move .deref from UnknownQuery to EntityQuery so that one can deref on EntityQuery if need be. (#160)

  • Default z.unknown() schema for .grabOne/.grabOne$ methods (#162)

0.15.2

Patch Changes

  • Setup NPM provenance (#156)

0.15.1

Patch Changes

  • Add .filter() method to EntityQuery (#149)

0.15.0

Minor Changes

  • Remove makeContentBlockQuery from exports (#127)

Patch Changes

  • Export BaseQuery class (#131)

0.14.0

Minor Changes

  • Deprecate q.sanityImage in favor of standalone sanityImage method, address #109 (#117)

  • Loosen _type field of content block to z.string(), since _type: "block" isn't necessarily required. Addresses #114. (#118)

Patch Changes

  • Add README back to groqd package (#113)

  • Report all errors in makeSafeQueryRunner (#121)

  • Expose makeContentBlockQuery function for more flexibility around block content querying. (#120)

0.13.1

Patch Changes

  • Moving to monorepo, this is a test release to ensure changesets functionality remains in tact (#107)

0.13.0

Minor Changes

  • Add filterByType convenience method (#102)

0.12.0

Minor Changes

  • Optional isArray option for q()/pipe() method (#98)

0.11.0

Minor Changes

  • Update makeSafeQueryRunner to provide more legible error message when parsing fails (#95)

0.10.0

Minor Changes

    • q.select schema helper for stronger union types and default conditions (#82) (#82)
    • ArrayQuery.select & EntityQuery.select helpers to spread select functions in a block scope (#82)

0.9.2

Patch Changes

  • Make sanityImage imageDimensions._type an optional field (#86)

  • Specify custom markdef types in q.contentBlock[s], addresses #61. (#87)

0.9.1

Patch Changes

  • Add hasAlpha, isOpaque, and blurHash options to q.sanityImage's withAsset options. (#84)

0.9.0

Minor Changes

  • nullToUndefined, grab$, and grabOne$ helpers to make dealing with null return values much more friendly. (#72)

0.8.0

Minor Changes

  • added slug utility for easier slug access (#67)

Patch Changes

  • added new contentBlocks helper for contentBlock as list (#66)

  • fixed illustrative example in readme docs (#65)

0.7.0

Minor Changes

  • Add TypeFromSelection utility type to extract TS type from a selection object (#63)

0.6.3

Patch Changes

  • Allow InferType to accept zod schema type (#54)

0.6.2

Patch Changes

  • Remove changesets from prod dependencies (#51)

0.6.1

Patch Changes

  • Fix q.sanityImage asList -> isList in docs (#48)

0.4.0 – 0.6.0

  • q.sanityImage helper.
  • q.object schema for Zod objects.
  • q.contentBlock schema helper for block content.
  • q.score function.
  • Make makeQueryRunner more flexible.

0.3.2

  • Introduce q.array for Zod array support.

0.3.0

  • Refactor to builder pattern.

0.0.1 – 0.0.5

  • Initial setup of groqd, including the q pipeline and initial helpers.

0.1.0

  • InferType type utility to better infer type from query result, via #7.

groqd@0.15.13-legacy.0

11 Apr 22:58

Choose a tag to compare

Pre-release

Patch Changes

  • Fixed a bug where the q.contentBlock() function would miss blocks whose marks property was omitted or undefined. (#370)

groqd@1.3.0

25 Feb 20:07
2cfb58f

Choose a tag to compare

Minor Changes

  • Feature: added .asCombined() utility, which allows projections from multiple types at once (#366)

Patch Changes

  • Feature: added "passthrough" parameter for raw (#362)

  • Improvement: updated all examples to prefer using zod directly, like z.string() (#366)
    Improvement: export zod as z

  • Improvement: improved fragment types seen in IDEs (#365)

    Chore: ensure we explicitly export types, rather than export *, to limit "noise"

groqd@1.2.0

19 Feb 22:11
78394d4

Choose a tag to compare

Minor Changes

  • Feature: added count method (#354)

    Feature: added coalesce method

Patch Changes

  • Fix: always require [] when projecting arrays. (#358)

    • Prevents issues with chaining .deref() and .field()
    • Makes code clearer
    • Reduces noise in auto-complete suggestions