投稿時間:2022-12-03 01:33:41 RSSフィード2022-12-03 01:00 分まとめ(37件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] オンライン接客ツール「LiveCall」 無料プランの提供を開始 https://www.itmedia.co.jp/business/articles/2212/02/news125.html itmedia 2022-12-03 00:39:00
python Pythonタグが付けられた新着投稿 - Qiita API設計 ハンズオン https://qiita.com/yousuke_1112/items/5bb4b5b0c3512662d2fd fastapi 2022-12-03 00:45:57
python Pythonタグが付けられた新着投稿 - Qiita ラズパイさんがいる生活 https://qiita.com/Kuniy/items/4a7a76bf77d5121073e1 組み込み 2022-12-03 00:43:18
python Pythonタグが付けられた新着投稿 - Qiita AtCoder Beginner Contest(ABC) 277 - Pythonでのバーチャル参加結果と内容整理 https://qiita.com/tk226/items/4291eaf9549d4d03b9cc atcoder 2022-12-03 00:00:48
js JavaScriptタグが付けられた新着投稿 - Qiita 【Vue.js】画像の配置場所による違いをkwsk https://qiita.com/TOGO_TOGO/items/54f22eb65cf5f372f761 使い分け 2022-12-03 00:07:24
AWS AWSタグが付けられた新着投稿 - Qiita DatabricksのFeature StoreをDynamoDBに発行してオンライン推論してみた https://qiita.com/shotkotani/items/40d343f1bbccc852e110 databricks 2022-12-03 00:22:39
AWS AWSタグが付けられた新着投稿 - Qiita AWS CLIの認証情報の優先順位を理解する https://qiita.com/kinchiki/items/04b7723778224c6d1b98 awscli 2022-12-03 00:21:15
技術ブログ Developers.IO Alteryx Serverのユーザーのロールと権限と作成方法 – Alteryx Serverアドベントカレンダー2022 https://dev.classmethod.jp/articles/alteryxserver-adventcalendar-20221203/ developersioalteryxs 2022-12-02 15:45:09
技術ブログ Developers.IO AWS re:Invent 2022 re:Play party へ参加してきました #reinvent https://dev.classmethod.jp/articles/aws-reinvent-2022-replay-party-join/ lcometothecoolestpartyint 2022-12-02 15:40:04
技術ブログ Developers.IO Snowflake Marketplace上でインテージ社が提供する商品マスタと店舗マスタのサンプルを試してみた #SnowflakeDB https://dev.classmethod.jp/articles/snowflake-marketplace-intage-item-store-master/ adventcalendar 2022-12-02 15:30:18
海外TECH MakeUseOf Is Your Activation Key Not Working in Windows 11? How to Fix It https://www.makeuseof.com/windows-11-activation-key-not-working/ windows 2022-12-02 15:16:15
海外TECH DEV Community A journey towards a type-safe GraphQL API server https://dev.to/energiebespaarders/a-journey-towards-a-type-safe-graphql-api-server-52p8 A journey towards a type safe GraphQL API serverSeveral years ago we performed a big rewrite of our back end codebase now better known as The Great Migration from a JavaScript monolith into a central GraphQL API written in TypeScript connected to a few micro services Since that time we ve continuously been upping our TypeScript game to help us guide development One area that we ve recently put effort into is configuring type generation for our API schemas Our main motivation for generating the types from our API schemas was removing ambiguity Often in large or complex JavaScript codebases unless you just wrote a piece of code yourself you don t know the exact content of a variable until inspecting it at runtime For a long time however JavaScript s ambiguity remained in our TypeScript codebase wherever data was coming in or out through an API The types assigned for that data needed to be manually crafted and maintained whenever the API schema was updated which is an error prone process In this blogpost we re sharing our experience learnings and desired improvements in generating TypeScript types for our NodeJS GraphQL API server Type generation for GraphQL serversThere are two main approaches to keeping the types of the GraphQL schema and entities in business logic in sync You can generate the schema based on your TypeScript code e g TypeGraphQL or you can generate types based on your schema e g GraphQL Code Generator We opted for the latter since it slotted right into our existing GraphQL server implementation using Apollo Server The problemApollo Server does not provide type generation for resolvers out of the box Therefore in our initial implementation we just manually wrote type definitions that reflected the types in the schema The schema types are enriched with extra fields which we write resolvers for src customers customer tsexport interface ICustomer id string email string firstName string lastName string src customers schema tsconst customerTypeDef GraphQL type Customer implements User id ID firstName String lastName String houses House lt A resolved field src customers resolvers tsimport IObjectTypeResolver from graphql tools utils import ICustomer from customer type BaseResolverObject lt T gt IObjectTypeResolver lt T ResolverContext any gt const customerResolvers BaseResolverObject lt ICustomer gt async houses customer context Promise lt House gt return CustomerService findHouses context customer id For simple resolvers that perform a look up like houses this is not a problem But with code that evolves fast and types that are nearly identical to each other mismatches between the schema and TypeScript definition will occasionally occur src customers schema tsconst mutationTypeDefs GraphQL input CustomerRegistrationInput firstName String lastName String email String phone String password String extend type Mutation registerCustomer customer CustomerRegistrationInput Customer src customers resolvers tsconst mutations BaseResolverObject lt never gt async registerCustomer customer customer ICustomer amp password string context Promise lt Customer gt return CustomerService register context customer In cases like this one it wasn t uncommon for us to reuse existing type definitions ICustomer for the schema s input types CustomerRegistrationInput These usually overlap sufficiently to work with but more than often contain fields that don t exist on the actual input type or differ in terms of nullability The solutionGraphQL Code Generator can eliminate this ambiguity between the GraphQL Schema and TypeScript by generating the required TypeScript types from the GraphQL schema With a relatively simple configuration file the resolvers in the example above can be transformed into the following src customers resolvers ts with type generationimport MutationResolvers from generated graphql const mutations MutationResolvers async registerCustomer customer context Promise lt Customer gt return CustomerService register context customer The configuration file allows setting up a mapping between the type definitions of our own entities and the types generated through the schema This allows us to receive and return our own types in the resolvers keeping our business logic and API layer cleanly separated and reducing code duplication codegen yml Configuration documentation schema SCHEMA PATH http localhost graphql documents nullgenerates src generated graphql ts plugins typescript typescript resolvers add content import FileUpload from graphql upload config Needed for apollo server compatibility useIndexSignature true contextType BaseResolver ResolverContext Needed for our mixed use of null and undefined corresponding to nullable values in GraphQL maybeValue T null undefined Linking enums inserted into the schema back to their definition in TypeScript so they don t get re generated enumValues UserType users User UserType Custom mapping to model types use your model types mappers mapperTypeSuffix Model showUnusedMappers true mappers Customer users Customer CustomerOnce this configuration has been set up any time after updating the schema the types can be re generated and the TypeScript compiler will tell you which resolvers need to be updated By integrating this in the CI CD pipeline too the stability of the resolvers is improved greatly The configuration of GraphQL Code Generator is very flexible and is continuously being improved For example since type names in the schema and code usually overlap the mapperTypeSuffix option was introduced to automatically redefine the mapped types in the generated code to append a keyword such as “Model Similarly for enums since two identical enum definitions may not be compared in TypeScript the configuration allows you to map the generated enums in the schema to those defined in your own code BenefitsOverall it s pretty great Compared to our previous way of working it prevents errors reduces risk and saves us time by eliminating the error prone process of writing and maintaining types manually It also reduces code duplication and prevents mismatches in the schema versus the TypeScript types that represent the schema An unexpected benefit in our case is that it also enforces the schema to be properly defined Some schema types that were set up in the very beginning of our use of GraphQL had all fields defined as nullable and in rare cases fields we expected to be there were completely missing Issues we ran intoWhile the type generation setup we ended up with is really useful overall it does leave some things to be desired The Maybe typeA major gripe we experience is due to GraphQL having no distinction between null and undefined fields and arguments can just be nullable which appear as Maybe lt T gt in the generated types While null and undefined are similar they are not interchangeable in JavaScript or TypeScript Undefined indicates the lack of a value while null indicates the existence of a value just that it is null Although it is possible to define the Maybe type to just be null or undefined both of them are needed in our current way of working We expect nullable values in the schema on input types to be optional in TypeScript meaning possibly undefined However we sometimes define an entity s fields as possibly being null in TypeScript which causes trouble when returning it in a resolver Our usage of null comes from the decision to align with its use of our database client MongoDB for the ability to un set the value of a field A Partial type of an entity can be passed in an update method where undefined values remain as is and only fields explicitly set to null will be un set interface IProduct id string created Date Can be un archived by setting this value to null archived Date null async unArchiveProduct id string this productRepository updateOne id archived null For the moment our Maybe type remains possibly both null or undefined For input types we usually strip off all null types using a DeepNonNullable type cast since it is not present on the vast majority of our entities Alternatively for our situation null from the Maybe type could be omitted by dealing with the requirement of un setting fields in the database in another way such as setting up separate mutations for that purpose and moving the responsibility to the database layer type DeepNonNullableArray lt T gt Array lt DeepNonNullable lt NonNullable lt T gt gt gt type DeepNonNullableObject lt T gt P in keyof T DeepNonNullable lt NonNullable lt T P gt gt export type DeepNonNullable lt T gt T extends any DeepNonNullableArray lt T number gt T extends Record lt string unknown gt DeepNonNullableObject lt T gt NonNullable lt T gt Keeping generated types separate from business logicQuickly after introducing generated types from our GraphQL schema they started leaking into our business logic Sometimes by accident due to not paying attention to the automatic import functionality and sometimes intentionally to not having to bother with defining TypeScript definitions ourselves for trivial cases in our business logic After a while however cryptic build errors started appearing When a type that is mapped to in the generated file depends on a generated type it creates an import cycle These are notoriously hard to solve and can appear out of nowhere after re organizing imports of seemingly unrelated files as to what is causing the cycle Therefore we chose to only make use of the generated types in our resolvers our business logic should remain free of them To enforce this decision a lint rule was set up using the import no restricted paths ESLint plugin import no restricted paths error zones target src resolvers ts from src generated graphql ts message Generated GraphQL types may only be used in resolvers Along with our rule to not define business logic in resolvers this reduces the potential of the generated types somewhat Though it does help to separate our API from the other layers in our codebase Usually the generated type and its match in the business logic are almost identical so we can perform a type cast TypeScript will warn us if there is a mismatch Writing adapters to perform this task was considered but disregarded to avoid introducing unneeded overhead For now input types are usually converted into our own types directly in the resolvers Mapped paths are not validatedA small nitpick When updating the mapping of entities or enums in the codegen configuration no warning or error is given when a mistake is made in a path or name of a type when generating the types The need for updating the configuration is infrequent so it s only a small annoyance For now we re relying on the TypeScript compiler to tell us about it in the build process Codegen configuration examplesWhile the documentation of GraphQL Codegen is decent there aren t many complex configuration examples to be found We have posted ours earlier in this article We based ours on threads like this one We d be interested to see more examples best practices and tips n tricks Wrap upType generation has become one of the techniques we rely most on nowadays because It saves time in maintaining two type definitions that should be identicalIt prevents the error prone process of maintaining mappings of one type definition to another It reduces easily missed runtime errors by eliminating ambiguityIt helps to avoid introducing breaking schema changes as It enforces correct use of the schemaWriting types yourself is for mugsDo you like GraphQL Are you looking for work Reach out 2022-12-02 15:20:36
Apple AppleInsider - Frontpage News Zendure SuperBase V is the ultimate power station https://appleinsider.com/articles/22/12/01/zendure-superbase-v-is-the-ultimate-power-station?utm_medium=rss Zendure SuperBase V is the ultimate power stationZendure has launched the most impressive power station yet with up to W of solar input EV charging and can be stacked for up to kWh of total power Zendure SuperBase VThe SuperBase V from Zendure is a massive power station that is expandable portable and has successfully raised more than five million dollars during its crowdfunding campaign And it s available to preorder now Read more 2022-12-02 15:56:05
海外TECH Engadget TikTok and Bumble join anti-revenge-porn initiative https://www.engadget.com/tiktok-bumble-revenge-porn-initiative-meta-facebook-instagram-155555779.html?src=rss TikTok and Bumble join anti revenge porn initiativeTikTok and Bumble are the latest tech companies to join an initiative aimed at reducing the spread of revenge porn ーintimate images and videos shared without the subject s consent They ve partnered with StopNCII org Stop Non Consensual Intimate Image Abuse which hosts a tool developed in partnership with Meta TikTok Bumble Facebook and Instagram will detect and block any images that are included in StopNCII org s bank of hashes The website enables people to create hashes unique digital fingerprints of images and videos in question This process takes place on their device In order to protect users privacy the actual files aren t uploaded to StopNCII org only a unique string of letters and numbers Hashes submitted to StopNCII org are shared with the initiative s partners If an image or video uploaded to TikTok Bumble Facebook or Instagram matches a corresponding hash and meets partner policy requirements the file will be sent to the platform s moderation team If moderators find that the image breaks their platform s rules they ll remove it The other partner platforms will block the image from being shared too The tool has been live for a year and more than people have created cases to prevent intimate videos and images being shared without consent Users have created more than hashes to date As Bloomberg notes Meta partnered with SWGfL the UK nonprofit behind the Revenge Porn Helpline to develop StopNCII org SWGfL hopes that many more platforms will sign up The initiative builds on a pilot Meta then known as Facebook started in Australia in that asked users to upload revenge porn images to a Messenger chat with themselves Meta promised to delete the images after hashing them but the approach raised obvious privacy concerns TikTok and Bumble are joining the initiative amid increasing regulatory scrutiny on the former and a broader crackdown on revenge porn The UK for instance plans to force platforms that host user generated content to take down non consensual intimate images more swiftly as laid out in the government s Online Safety Bill 2022-12-02 15:55:55
海外TECH Engadget What we bought: How Zwilling’s Cool Touch Kettle became my most-used kitchen gadget https://www.engadget.com/zwillings-cool-touch-kettle-irl-153513688.html?src=rss What we bought How Zwilling s Cool Touch Kettle became my most used kitchen gadgetI never got into coffee but I do love a good cuppa That said I have zero respect for the natural process of boiling water The internet tells us that water boils faster at high altitude and I ve been living between and feet for the past ten years But I swear it was taking longer Maybe chalk that up to the inverse relationship between patience and age Somehow evading the laws of thermodynamics Zwilling s electric kettle does something spooky to water boiling it in a fraction of the time I ever thought possible Officially called the Zwilling Cool Touch Kettle it s made by the German brand Zwilling J A Henckels which I d previously only known for their chef s knives that have been around since the s I stumbled upon the kettle while researching knives for a kitchen roundup at a previous job and decided to buy one Glad I did Amy Skorheim EngadgetI ve owned electric kettles before but they seemed to boil water only moderately faster than a microwave They also had suspect cleanliness issues either not allowing access to the interior or having the heating elements exposed and crusty looking at the bottom of the kettle No such problems here though with the Zwiling s fully enclosed fully accessible interior I ve had the kettle for over a year now and it s got some calcium buildup but not so bad that I ve felt the need to clean it This kettle is part of Zwilling s Enfinigy line and besides sounding vaguely indecent Enfinigy is an indicator of the kettle s energy optimization Though it pumps out watts of power it s using those watts for a short period of time automatically shutting off when water reaches a boil Simple physics explains the efficiency at work here the hefty amount of wattage delivered by an equally hefty cord fires up an internal element that gets hot quickly The element sits directly beneath your water sending heat into the well insulated chamber where it can t escape into the ether Since less heat is wasted there s more going directly to boiling the water and voila hot water faster Amy Skorheim EngadgetTo prove its superiority I decided to pit the boil times of the Zwilling kettle against my watt microwave and natural gas stove If I compared the results to free throw skills the kettle is Steph Curry The microwave and stove are me In terms of numbers two eight ounce cups in the Zwilling boiled in two minutes The same amount in the microwave took five minutes and the stove got the water roiling in five minutes and seconds You can boil as little as two “cups at a time more on that below which goes fast and saves a bunch of energy in the process In a ploy to cheat time I now use the Zwilling to boil pasta water too adding a tiny amount to a pot on the stove and putting the majority of the HO in the kettle transferring it over when it boils It always results in faster mac and cheese which makes everyone happy My only gripe is the lid It s got an easy open button operated mechanism that raises the lid…halfway Or a little more than halfway to a degree angle That s intentional and meant to keep people from burning their faces with steam but I always wish it could open a little wider to make adding water and checking the level easier Amy Skorheim EngadgetThe only other issue I have is with the interior measurement markings There are markers for metric liters which are as straightforward as the metric system itself But for imperial units the cup markers are for “coffee cups which someone has decided means six ounces instead of eight Nice for that one cup to one tablespoon ratio for coffee but trickier for cooking Also do we need to add more complications to imperial measurements I didn t even mention how good it looks It s going to live on your countertop its entire life so thankfully the matte silver gray hue and streamlined single button interface are lovely to look at And operation is dead simple Click the button to start pull the kettle off the base to stop The button on the lid is in just the right spot ergonomically speaking and the pour is smooth and as slow or fast as your preferred drink requires from an herbal tea flood to a thin pour over stream Not all kettles are worthy of a price tag but this one is 2022-12-02 15:35:13
金融 RSS FILE - 日本証券業協会 PSJ予測統計値 https://www.jsda.or.jp/shiryoshitsu/toukei/psj/psj_toukei.html 統計 2022-12-02 16:00:00
金融 金融庁ホームページ 入札公告等を更新しました。 https://www.fsa.go.jp/choutatu/choutatu_j/nyusatu_menu.html 公告 2022-12-02 17:00:00
金融 金融庁ホームページ 「トランジション・ファイナンス環境整備検討会(第6回)」を開催します。 https://www.fsa.go.jp/news/r4/singi/20221202-2.html 環境 2022-12-02 17:00:00
金融 金融庁ホームページ 金融庁・金融情報システムセンター(FISC)の 意見交換会について公表しました。 https://www.fsa.go.jp/news/r4/sonota/20221202-2/20221202-2.html 意見交換 2022-12-02 17:00:00
金融 金融庁ホームページ 地域銀行の令和4年9月期決算の概要を公表しました。 https://www.fsa.go.jp/news/r4/ginkou/20221202/20221202.html 地域銀行 2022-12-02 16:00:00
金融 金融庁ホームページ 主要行等の令和4年9月期決算の概要を公表しました。 https://www.fsa.go.jp/news/r4/ginkou/20221202-1/20221202-1.html 行等 2022-12-02 16:00:00
金融 金融庁ホームページ FSR Holdings株式会社に対する行政処分について公表しました。 https://www.fsa.go.jp/news/r4/sonota/20221202/20221202.html fsrholdings 2022-12-02 16:00:00
ニュース BBC News - Home Strep A: Fourth child dies from bacterial disease https://www.bbc.co.uk/news/uk-england-london-63835595?at_medium=RSS&at_campaign=KARANGA children 2022-12-02 15:02:16
ニュース BBC News - Home Indonesia set to punish sex before marriage with jail time https://www.bbc.co.uk/news/world-asia-63838213?at_medium=RSS&at_campaign=KARANGA cohabitation 2022-12-02 15:51:45
ニュース BBC News - Home 'Somewhat bloodthirsty' NYC rat catcher wanted https://www.bbc.co.uk/news/world-us-canada-63837306?at_medium=RSS&at_campaign=KARANGA bloodthirsty 2022-12-02 15:11:47
ニュース BBC News - Home World Cup 2022: Andre Ayew misses penalty for Ghana https://www.bbc.co.uk/sport/av/football/63839325?at_medium=RSS&at_campaign=KARANGA rochet 2022-12-02 15:42:39
ニュース BBC News - Home World Cup 2022: Giorgian de Arrascaeta gives Uruguay the lead from Luis Suarez assist https://www.bbc.co.uk/sport/av/football/63839573?at_medium=RSS&at_campaign=KARANGA World Cup Giorgian de Arrascaeta gives Uruguay the lead from Luis Suarez assistGiorgian de Arrascaeta nods Uruguay in front against Ghana from close range after Luis Suarez s shot was blocked by goalkeeper Lawrence Ati Zigi 2022-12-02 15:50:37
ニュース BBC News - Home World Cup 2022: Japan goal has fans making their own VAR explainers on social media https://www.bbc.co.uk/sport/football/63832775?at_medium=RSS&at_campaign=KARANGA World Cup Japan goal has fans making their own VAR explainers on social mediaWith no images released to show why Japan s controversial winner against Spain was not ruled out fans online have taken matters into their own hands 2022-12-02 15:54:32
北海道 北海道新聞 オホーツク管内290人感染 新型コロナ https://www.hokkaido-np.co.jp/article/769444/ 医療機関 2022-12-03 00:18:00
北海道 北海道新聞 日本ハム松本剛「今年ダメならクビになる」 崖っぷち覆し最高評価 契約更改 https://www.hokkaido-np.co.jp/article/769508/ 契約交渉 2022-12-03 00:15:27
北海道 北海道新聞 レバンガ、3日から滋賀戦 https://www.hokkaido-np.co.jp/article/769509/ 男子 2022-12-03 00:12:00
北海道 北海道新聞 厚真、安平、むかわ3町「社会増」 宅地整備や教育、起業支援策が奏功 https://www.hokkaido-np.co.jp/article/769485/ 起業支援 2022-12-03 00:11:41
北海道 北海道新聞 北海道新幹線札幌延伸 「30年度開業」結論先送り 国交省、工期遅れで https://www.hokkaido-np.co.jp/article/769503/ 北海道新幹線 2022-12-03 00:11:05
北海道 北海道新聞 スキーW杯複合女子、葛西優7位 開幕戦、中村は15位 https://www.hokkaido-np.co.jp/article/769505/ 開幕戦 2022-12-03 00:05:00
北海道 北海道新聞 敵基地攻撃能力保有へ 専守防衛なし崩し懸念 着手や対象、曖昧なまま https://www.hokkaido-np.co.jp/article/769502/ 専守防衛 2022-12-03 00:01:00
北海道 北海道新聞 「こんな人権感覚怖い」道内から批判 杉田氏がアイヌ民族「侮蔑」投稿撤回 https://www.hokkaido-np.co.jp/article/769493/ 性的少数者 2022-12-03 00:01:04
ビジネス 東洋経済オンライン NHK次期会長人事、丸紅元社長の朝田氏で最終調整 内部では新会長を支える新執行部体制の議論も | 通信 | 東洋経済オンライン https://toyokeizai.net/articles/-/637320?utm_source=rss&utm_medium=http&utm_campaign=link_back 任期満了 2022-12-03 00:15:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)