SShortSingh.
Back to feed

GraphQL @oneOf Directive Now Standard, Enforcing Exactly One Input Field in Schemas

0
·14 views

The GraphQL specification's September 2025 edition officially standardizes the @oneOf directive, which enforces that exactly one field is supplied in an input object. Previously, developers had to choose between multiple root fields or nullable arguments with manual resolver-level validation — both error-prone approaches. By marking an input type with @oneOf, the schema itself rejects invalid combinations before a resolver ever runs, moving constraint logic out of application code. The directive also enables polymorphic inputs, filling a long-standing gap since GraphQL has supported union types only on the output side. Major server libraries including GraphQL.js v16+, GraphQL Ruby, GraphQL Java, and others already ship support for the feature.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Qwenputer: Deterministic RISC-V CPU Implemented Inside Qwen3.5 Model

A blog post on divagr.com describes Qwenputer, a project that runs a functioning, deterministic RISC-V processor inside the Qwen3.5 language model. The article is shared on Hacker News, where it has gained a modest number of points and no comments so far. The post's full technical details are not reflected in the available text, so the specifics of the implementation cannot be confirmed here. The project is presented as a demonstration of computation carried out within a neural network's architecture.

0
ProgrammingHacker News ·

New York Times Adds More AI Features to Cooking App, Drawing User Complaints

The New York Times is expanding the artificial intelligence features in its Cooking app. Users have reacted negatively to the additions, according to a Nieman Lab report. The article is an external link and the available text contains only the source link and basic discussion metrics, so specific details of the new features are not included here. The change reflects the publication's broader push to integrate AI into its consumer products. Further details on the features and the nature of user objections would be found in the original Nieman Lab article.

0
ProgrammingHacker News ·

Apple Prepares Developers for Touch Input on Mac

Apple has published a developer page titled 'Get Ready for Touch on Mac,' signaling preparation for touch-based interaction on its Mac computers. The article was shared on Hacker News, where it gathered 17 points and 20 comments. The available material does not include the full details of the page, so specifics about timing, hardware, or features cannot be confirmed from this item alone. The post drew attention from the developer community, which is likely interested in how such a change would affect app design and compatibility.

0
ProgrammingDEV Community ·

Is the 8GB ARC A750 at $160 Worth It for Home Server Workloads?

A reader weighing a $160 8GB Intel ARC A750 GPU is assessing whether it justifies the cost for their home server. Their current Core i5 14400 relies on integrated graphics, which handles light tasks like Minecraft hosting but struggles with heavy transcoding and game streaming. The article argues the ARC A750's dedicated VRAM and parallel processing could offload Jellyfin 4K transcoding and game encoding, reducing CPU strain and stuttering. However, workloads such as NextCloud, Paperless, and Home Assistant gain nothing from a GPU, so the card's value depends on actual usage. Used NVIDIA 30-series cards at similar prices may offer better driver support and compatibility, which the analysis weighs as an alternative.