IT |
気になる、記になる… |
Appleの整備済み商品情報 2021/5/21 |
https://taisy0.com/2021/05/21/140801.html
|
apple |
2021-05-21 12:43:19 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] 押して歩く時もモーターが補助する電動アシスト自転車、パナソニックが発売 |
https://www.itmedia.co.jp/news/articles/2105/21/news152.html
|
itmedia |
2021-05-21 21:13:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] メルカリ、顧客情報など2万7000件以上流出 外部ツールへの不正アクセスで |
https://www.itmedia.co.jp/news/articles/2105/21/news151.html
|
codecov |
2021-05-21 21:01:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Python boot camp by Dr.Angela day17 |
https://qiita.com/Shellyhackinglab/items/de78ca6b3c8c0df2ded6
|
PythonbootcampbyDrAngeladayHowtocreateclassclasspyclassUserpassuserUserusernameJackuseriduserUserusernameMikeuseridこんなことを毎回やるのかばかばかしいだろう。 |
2021-05-21 21:29:34 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScriptの手引き |
https://qiita.com/riya81/items/6276bc8bc56468f85492
|
|
2021-05-21 21:43:49 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
背景画像付きのaリンクをブラウザのサイズによって表示サイズを変えたい。 |
https://teratail.com/questions/339648?rss=all
|
背景画像付きのaリンクをブラウザのサイズによって表示サイズを変えたい。 |
2021-05-21 21:41:23 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
動画再生アプリをバックグラウンドにしたときにPicture in Pictureで再生したい |
https://teratail.com/questions/339647?rss=all
|
動画再生アプリをバックグラウンドにしたときにPictureinPictureで再生したい概要iosからpicturenbspinnbsppictureがバックグラウンドでも再生できるということで試してみたんですがバックグラウンドに回したときに再生されません。 |
2021-05-21 21:23:15 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【rails】enumを用いてユーザーの都道府県を登録した場合の都道府県別ユーザー表示について |
https://teratail.com/questions/339646?rss=all
|
【rails】enumを用いてユーザーの都道府県を登録した場合の都道府県別ユーザー表示について前提・実現したいことオリジナルアプリ制作で、各都道府県のリンクを押すとその都道府県の番号を持つユーザーagentを表示させたいです。 |
2021-05-21 21:17:31 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
HTMLのページ遷移を正常にしたい! |
https://teratail.com/questions/339645?rss=all
|
HTMLのページ遷移を正常にしたいこちらの質問に目を通していただきまして誠にありがとうございます。 |
2021-05-21 21:16:54 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
uninitialized constant エラーを解決できません。 |
https://teratail.com/questions/339644?rss=all
|
uninitializedconstantエラーを解決できません。 |
2021-05-21 21:16:02 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
WearOSの開発言語について |
https://teratail.com/questions/339643?rss=all
|
swift |
2021-05-21 21:14:20 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Googleデータポータルでスプレッドシートから取り込んだデータソースをディメンションから指標に変更したい |
https://teratail.com/questions/339642?rss=all
|
aaabbbccc |
2021-05-21 21:10:09 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
お手軽Rubyスクリプト 馬連用の組み合わせ作成 |
https://qiita.com/KeachT/items/3a92744b8ca760f35f14
|
rubyhorsescombinationrb・Windowsの場合Progateさんのページを参考にRubyをインストールします。 |
2021-05-21 21:57:35 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
【Rails】gem refileで複数画像アップロードを実装する3つのステップ |
https://qiita.com/akahito1006/items/1974ec7e1158273794cf
|
それらの内、Refileによる複数ファイルアップロード機能では、同gemでの単一アップロード機能の場合とは異なり「対Nのアソシエーション関係をもつモデル」が機能実装に必須の条件である点に注意が必要です。 |
2021-05-21 21:10:36 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWS コスト管理関連サービス概要 |
https://qiita.com/esta0136/items/16420a4e5f2442398f69
|
|
2021-05-21 21:29:57 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
【備忘録】初めてのCakePHP① - 環境構築編 |
https://qiita.com/kaba_farm/items/968e7d167089fcd96190
|
【備忘録】初めてのCakePHP①環境構築編環境MacOSCatalinaDockerforMacVersionPHPLaravelvueDockerでローカルの環境構築プロジェクト用ディレクトリを用意Terminalmkdirpworkspacecakeblogcdworkspacecakeblogmkdirpcakeappmntmysqldockerphpnginxmkdirdockernginxconfdlogsenvの準備先にenvexampleを編集してからコピーしてenvをつくるcakeblogtouchenvexamplegitignoreenvexampleとgitignoreを編集envexamplePROJECTPATHsrcTZAsiaTokyoWEBPORTDBPORTDBTESTINGPORTDBCONNECTIONmysqlDBNAMEappnameDBUSERwillrewriteDBPASSwillrewriteDBROOTPASSwillrewriteMAILHOGPORTMAILHOSTmailMAILPORTCOMPOSEHTTPTIMEOUTenvexampleをコピーcakeblogcpenvexampleenvコピー後、個別のプロジェクトに合わせてenvの環境変数を上書きするenvPROJECTPATHcakeappTZAsiaTokyoWEBPORTDBPORTDBTESTINGPORTDBCONNECTIONmysqlDBNAMEcakeblogDBUSERcakeuserDBPASScakepassDBROOTPASSfoobarMAILHOGPORTMAILHOSTmailMAILPORTCOMPOSEHTTPTIMEOUTgitignoreenvideaその他個別に追加必要なファイルを作成cakeblogtouchdockercomposeymldockerphpphpiniDockerfiledockernginxconfddefaultconfDockerfilemntmysqlgitignore各ファイルを編集dockercomposeymlversionserviceswebbuildcontextdockerfiledockernginxDockerfileargsTZTZvolumesdockernginxlogsetcnginxlogsdockernginxconfdetcnginxconfdPROJECTPATHvarwwwPROJECTPATHportsWEBPORTlinksappdependsonappappbuildcontextdockerfiledockerphpDockerfileargsTZTZvolumesPROJECTPATHvarwwwPROJECTPATHdockerphpphpiniusrlocaletcphpphpinilinksdbmasterenvironmentDBCONNECTIONDBCONNECTIONDBHOSTdbmasterDBDATABASEDBNAMEDBUSERNAMEDBUSERDBPASSWORDDBPASSTZTZMAILHOSTMAILHOSTMAILPORTMAILPORTdbmasterimagemysqlvolumesmntmysqlvarlibmysqldockermysqlmysqlconfetcmysqlconfdenvironmentMYSQLDATABASEDBNAMEMYSQLUSERDBUSERMYSQLPASSWORDDBPASSMYSQLROOTPASSWORDDBROOTPASSTZTZportsDBPORTNginxの設定dockernginxDockerfileFROMnginxalpinetimezoneARGTZCOPYdockernginxconfdetcnginxconfdCOPYdockernginxlogsetcnginxlogsCOPYPROJECTPATHvarwwwPROJECTPATHRUNapkupdateampampapkupdateaddtzdataampampcpusrsharezoneinfoTZetclocaltimeampampapkdeltzdataampamprmrfvarcacheapkdockernginxconfddefaultconfserverlistenservernameで設定した名前をローカルマシンのetchostsにも設定するservernamewwwcakeblogorgcakeblogorgcharsetutfclientmaxbodysizeMrootvarwwwcakeappwebrootindexindexphplocationaccesslogetcnginxlogsaccesslogmainerrorlogetcnginxlogserrorlogtryfilesuriuriindexphpisargsargslocationphpfastcgipassappfastcgiindexindexphpfastcgiparamSCRIPTFILENAMEdocumentrootfastcgiscriptnameincludefastcgiparamsPHPの設定dockerphpDockerfileFROMphpRCfpmalpinetimezoneARGTZWORKDIRvarwwwcakeappCOPYdockerphpphpiniusrlocaletcphpCOPYPROJECTPATHvarwwwPROJECTPATHRUNapkupgradeupdateampampapkaddnocachecoreutilsfreetypedevjpegdevlibjpegturbodevlibpngdevlibmcryptdevgitvimunziptzdatalibltdlicudevautoconfmakeampampdockerphpextinstallpdomysqlmysqlimbstringampampdockerphpextinstalljnprociconvampampdockerphpextconfiguregdwithfreetypedirusrincludewithjpegdirusrincludeampampdockerphpextinstalljnprocgdintlampampcpusrsharezoneinfoTZetclocaltimeampampapkdeltzdataampamprmrfvarcacheapkRUNcurlsSphpinstalldirusrlocalbinfilenamecomposerdockerphpphpinilogerrorsonerrorlogvarlogphpphperrorloguploadmaxfilesizeMmemorylimitpostmaxsizeMmaxexecutiontimemaxinputvarsdefaultcharsetUTFDatedatetimezoneTZmbstringmbstringinternalencodingUTFmbstringlanguageJapanesemysqlのマウントによるファイルはコード管理の対象外mntmysqlgitignoregitignore立ち上げcakeblogdockercomposerunappcomposercreateprojectpreferdistcakephpappgtAppConsoleInstallerpostInstallCreatedconfigapplocalphpfileCreatedvarwwwcakeapptmpcacheviewsdirectorySetFolderPermissionsDefaulttoYYnYPermissionssetonvarwwwcakeapptmpcachePermissionssetonvarwwwcakeapptmpcachemodelsPermissionssetonvarwwwcakeapptmpcachepersistentPermissionssetonvarwwwcakeapptmpcacheviewsPermissionssetonvarwwwcakeapptmpsessionsPermissionssetonvarwwwcakeapptmptestsPermissionssetonvarwwwcakeapptmpPermissionssetonvarwwwcakeapplogsUpdatedSecuritysaltvalueinconfigapplocalphpdockercomposeupddockercomposeexecappash初期設定composerupdateをすると以下のような注意が出るActionrequiredTheCakePHPplugininstallervnolongerrequiresthepostautoloaddumphookPleaseupdateyourappscomposerjsonfileandremoveusageofCakeComposerInstallerPluginInstallerpostAutoloadDump以下のことをやると注意書きが出なくなるjsoncomposerjsonscriptspostinstallcmdAppConsoleInstallerpostInstallpostcreateprojectcmdAppConsoleInstallerpostInstall↓この行を削除postautoloaddumpCakeComposerInstallerPluginInstallerpostAutoloadDumpchecktestcscheck環境変数の準備configbootstrapphp↓の記述行目あたりのコメントアウトを外すifenvAPPNAMEampampfileexistsCONFIGenvdotenvnewjosegonzalezDotenvLoaderCONFIGenvdotenvgtparsegtputenvgttoEnvgttoServervarwwwcakeappcpconfigenvexampleconfigenvconfigenvとりあえず変えたところを抜粋exportAPPDEFAULTLOCALEjaJPexportAPPDEFAULTTIMEZONEAsiaTokyo↓configapplocalphpのSecuritygtsaltの値を持ってくるexportSECURITYSALTffbfdfceecdefeeadcdbbaacDB接続関係の設定configapplocalphp変えたところ抜粋DatasourcesgtdefaultgthostgtenvDBHOSTlocalhostCakePHPwillusethedefaultDBportbasedonthedriverselectedMySQLonMAMPusesportMAMPuserswillwanttouncommentthefollowinglineandsettheportaccordinglyportgtnonstandardportnumberusernamegtenvDBUSERNAMEmyapppasswordgtenvDBPASSWORDsecretdatabasegtenvDBDATABASEmyapploggttrueurlgtenvDATABASEURLnulllocalhostにアクセスして、一旦初期画面を確認するマイグレーションvarwwwcakeappbincakebakemigrationCreateArticlestitlestringbodytextcategoryidintegercreatedmodifiedbincakebakemigrationCreateCategoriesparentidintegerlftintegerrghtintegernamestringdescriptionstringcreatedmodifiedconfigMigrationsCreateArticlesphpltphpuseMigrationsAbstractMigrationclassCreateArticlesextendsAbstractMigrationChangeMethodMoreinformationonthismethodisavailableherethechangemethodreturnvoidpublicfunctionchangetablethisgttablearticlestablegtaddColumntitlestringdefaultgtnulllimitgtnullgtfalsetablegtaddColumnbodytextdefaultgtnullnullgtfalsetablegtaddColumncategoryidintegerdefaultgtnulllimitgtnullgtfalsetablegtaddColumncreateddatetimedefaultgtnullnullgtfalsetablegtaddColumnmodifieddatetimedefaultgtnullnullgtfalsetablegtcreateconfigMigrationsCreateCategoriesphpltphpuseMigrationsAbstractMigrationclassCreateCategoriesextendsAbstractMigrationChangeMethodMoreinformationonthismethodisavailableherethechangemethodreturnvoidpublicfunctionchangetablethisgttablecategoriestablegtaddColumnparentidintegerdefaultgtnulllimitgtnullgtfalsetablegtaddColumnlftintegerdefaultgtnulllimitgtnullgtfalsetablegtaddColumnrghtintegerdefaultgtnulllimitgtnullgtfalsetablegtaddColumnnamestringdefaultgtnulllimitgtnullgtfalsetablegtaddColumndescriptionstringdefaultgtnulllimitgtnullgtfalsetablegtaddColumncreateddatetimedefaultgtnullnullgtfalsetablegtaddColumnmodifieddatetimedefaultgtnullnullgtfalsetablegtcreatevarwwwcakeappbincakemigrationsmigrateMAMPで環境構築する場合PHPパスの変更普通にプロジェクトを作成するだけでは、以下のようなintlをインストールしてくださいというエラーが出るYourrequirementscouldnotberesolvedtoaninstallablesetofpackagesProblemcakephpcakephprequireextintlgtitismissingfromyoursystemInstallorenablePHPsintlextensionRootcomposerjsonrequirescakephpcakephpgtsatisfiablebycakephpcakephpMacデフォルトのPHPからMAMPのPHPにパスを向け直すと解決する。 |
2021-05-21 21:35:50 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
Kubernetes Gateway API で高度なトラフィックルーティングを実現する |
https://qiita.com/kiyoshim55/items/0ac324181a8bfbb47cc8
|
Ingress自体の機能では、GatewayAPIとはで紹介したような機能が必要となる高度なユースケースに対応していなかったIngressの機能拡張のために、各種Ingresscontroller等で多数のカスタムアノテーションやCRDが実装されることにより、管理の複雑化やポータビリティ低下が発生していたカスタムアノテーションの場合、シンプルな表現しかできず機能も制限されるこれらの課題を解決するための新しい機能として、GatewayAPI当時の名称はServiceAPIsについての議論がKubeConCloudNativeConNorthAmericaSanDiegoで行われ、その後開発が進み、無事年月にvalphaバージョンがリリースされました。 |
2021-05-21 21:13:29 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
【Rails】gem refileで複数画像アップロードを実装する3つのステップ |
https://qiita.com/akahito1006/items/1974ec7e1158273794cf
|
それらの内、Refileによる複数ファイルアップロード機能では、同gemでの単一アップロード機能の場合とは異なり「対Nのアソシエーション関係をもつモデル」が機能実装に必須の条件である点に注意が必要です。 |
2021-05-21 21:10:36 |
海外TECH |
Ars Technica |
Vulnerabilities in billions of Wi-Fi devices let hackers bypass firewalls |
https://arstechnica.com/?p=1766544
|
malicious |
2021-05-21 12:39:55 |
海外TECH |
DEV Community |
CSS Animation Libraries |
https://dev.to/bhargavkumar7031/css-animation-libraries-np1
|
CSS Animation Libraries Animate cssAnimate css is a library of ready to use cross browser animations for use in your web projects Great for emphasis home pages sliders and attention guiding hints AnimistaAnimista is a CSS animation library and a playground where you can play with a collection of ready made CSS animations and download only those you will use Hover cssA collection of CSS powered hover effects to be applied to links buttons logos SVG featured images and so on Easily apply to your own elements modify or just use for inspiration Available in CSS Sass and LESS Magic AnimationCSS Animations with special effects built using SCSS and javascript |
2021-05-21 12:31:13 |
海外TECH |
DEV Community |
How long does it take to learn to code? |
https://dev.to/coderslang/how-long-does-it-take-to-learn-to-code-576a
|
How long does it take to learn to code In one word FOREVER You might think I am exaggerating but learning to code is an iterative and lifelong process Every day new technologies are being developed to optimize old workflows or introduce new and more efficient workflows Staying up to date with these technological advances and breakthroughs is important to stay relevant to the ever changing workplace landscape First StepsLet s backtrack for a moment if you are a beginner just starting on your coding journey or someone learning to code coming to know that learning to code is a journey not a destination could seem quite daunting and might deter you from carrying on but stay with me Learning to code is highly dependent on what your aim is what you want to do with your skills after you learn to code If you are learning to code as a hobby your aim could be learning the basics of programming then try out a bunch of avenues in coding and pick the niche that resonates the best with you If you picked up coding for professional enhancement or switching careers you might want to focus on developing the skills that are in high demand and can be picked up fast like Web Development Learning never stopsIf you want to build the software of your dreams after learning the basics you should break down the features of the software and then focus on learning those technologies only One of the things to keep in mind is you will face a plethora of challenges especially at the beginning when you don t know what you don t know But as you practice more and gain more experience you will discover more ways on how to write good quality code Going from this weird mix of single letter functions and variables const a function f x a push x function f x console log a f Date now f Date now f to this high quality self explaining code const dateList function recordDate date dateList push date function displayDates console log dateList recordDate Date now recordDate Date now displayDates Both pieces of code do the same thing but one is far more understandable just in a glance This will take time but as long as you keep going you will definitely get there As you progress through your journey you will also learn about the conventions and good practices for the tools and technologies you are using such as usage of snake case in Pythonsnake case object some function and camel case in JavaScript and TypeScript camelCaseObject someFunction Since coding is a journey make sure you are enjoying the journey If you are not enjoying the journey choosing a different path is always an option but make sure that you don t just run after a new shiny object whenever you come across one or the going gets hard put in of your effort because if you put in half hearted work the results you get will be half hearted as well By changing paths I mean if you are highly enthusiastic about Artificial intelligence Machine Learning and Big Data if you try BlockChain Development it s highly likely that you would not enjoy the process or if you are a visual person like me you would be better off pursuing Front End Web Development or App Development than diving into the field of Artificial intelligence Coding is truly a vast and wonderful domain which offers you endless possibilities from making a script to automate mundane tasks to enable everyday people to change the world by creating new pieces of software like Google and Facebook Chase your dreamsOne of the key ingredients of coding is it enables common folks to change the trajectory of where the world is headed such as the landing of a helicopter on Mars during Mars Helicopter Mission by NASA was facilitated by almost people from all around the world contributing to Open Source Projects on GitHub You can also leave a mark on this world using programming as a tool to achieve your dreams The process of learning to code is not easy just like anything worthwhile in life but it definitely highly satisfying and financially rewarding as well Another perk is having such a large number of sub domains that enables any developer to switch over to another field as he or she seems fit If you start off on this journey and keep putting one foot in front of the other even when challenges and difficulties show up you will make it Learn Full Stack JavaScript |
2021-05-21 12:28:16 |
海外TECH |
DEV Community |
Build a Serverless Data API with AppSync and DynamoDB |
https://dev.to/tom_millner/build-a-serverless-data-api-with-appsync-and-dynamodb-3jmi
|
Build a Serverless Data API with AppSync and DynamoDB IntroductionPlease find below a tutorial to create a serverless data api using AWS DynamoDB as the backend data store and AWS AppSync to create a GraphQL interface All the steps and code samples shared are defined in YAML I ve used the AWS SAM syntax where it s supported and CloudFormation where not SAM does not provide any syntax for AppSync but the good thing about SAM is that you can still use it to build and deploy a template that contains CloudFormation This means that while you don t get the shorthand that SAM provides for other services you can continue to use the same SAM setup and commands I think there is good scope for SAM to support AppSync in the same way it supports API Gateway and I hope that AWS adds it in the future You will need the AWS SAM CLI installed on your machine to complete this tutorial If you don t have it you can follow the instruction provided by AWS in this link I have kept this example very simple but it is still powerful The application outlined allows the creation update delete and selection of a JSON document through a GraphQL interface The document is stored in a map datatype in DynamoDB and indexed with a partition key and sort key With some clever thinking around how you construct these keys it can have many applications You can use composite Each item record in DynamoDB can be up to kb so you can also store quite a lot of data per item DynamoDB create your table This table will be the backend data store for the API APIName is a parameter passed into the template that will be re used as table name and API name As DynamoDB is a NoSQL database you don t need to define the schema upfront only the primary key columns The column to store the JSON will be added on writing the first item to the table DynamoDBTable Type AWS DynamoDB Table Properties TableName Ref APIName ProvisionedThroughput WriteCapacityUnits ReadCapacityUnits AttributeDefinitions AttributeName pk AttributeType S AttributeName sk AttributeType S KeySchema AttributeName pk KeyType HASH AttributeName sk KeyType RANGE IAMYou need to create a number of AWS IAM Policies and Roles to allow AppSync to access both the DynamoDB table and log to CloudWatch AppSync to DynamoDBThis policy will allow the attached principle to query the DynamoDB table created The CloudFormation Sub function allows you construct a single string from multiple inputs If you wish to reference variables in the Sub function they need to be wrapped in Keeping to the principle of least privilege I have included only the actions needed by the resolvers in AppSync and no others PolicyDynamoDB Type AWS IAM ManagedPolicy Properties Path service role PolicyDocument Version Statement Effect Allow Action dynamodb Query dynamodb GetItem dynamodb PutItem dynamodb DeleteItem Resource Sub arn aws dynamodb AWS Region AWS AccountId table DynamoDBTable Using sts AssumeRole attach the policy created to the AppSync service by creating a new role RoleAppSyncDynamoDB Type AWS IAM Role Properties ManagedPolicyArns Ref PolicyDynamoDB AssumeRolePolicyDocument Version Statement Effect Allow Action sts AssumeRole Principal Service appsync amazonaws com Log to CloudWatchTo allow AppSync access CloudWatch you use sts AssumeRole to attach the provided AWSAppSyncPushToCloudWatchLogs policy to the AppSync service This is an AWS Managed Policy that you can use when creating a new role Once the AppSync service assumes the role it will have access to create log groups and streams and log events to CloudWatch RoleAppSyncCloudWatch Type AWS IAM Role Properties ManagedPolicyArns arn aws iam aws policy service role AWSAppSyncPushToCloudWatchLogs AssumeRolePolicyDocument Version Statement Effect Allow Action sts AssumeRole Principal Service appsync amazonaws comThat is the IAM resources and DynamoDB table created Now we can start on creating the AppSync resources AppSyncNow we can start on the AppSync resources You need to create the following resources to have a fully working API API Header holder for the API components below with details of name authentication and monitoring level API schema This is where the API definition is modeled in a GraphQL schema definition language SDL DataSource A datasource is the component that provides the details about where the data is stored Resolvers Resolvers link the parts of the schema with the matching data sources They also provide any transformation necessary between the two using Apache Velocity Template Language VTL API Key In this tutorial I am using an API Key to control access to the API You can also use IAM or Cognito It does seem like a lot to specify and I think there is opportunity for SAM to abstract some of this away as it does for API Gateway Through the console you can create a new AppSync API with a wizard by pointing it at a DynamoDB table so it s really just getting something similar in an IAC format As of now you have to specify each of these individually with CloudFormation API HeaderThis resource creates the API header using the passed in parameter the same one we used for the DynamoDB TableName parameter The LogConfig section sets up CloudWatch logging using the role we created earlier I have set it to the highest level of logging but you can reduce it down is this is too much by adjusting the parameters of the ExcludeVerboseContent and FieldLogLevel properties Reduce the amount of logs written by setting FieldLogLevel to NONE ERROR or ALL GraphQLApi Type AWS AppSync GraphQLApi Properties Name Ref APIName AuthenticationType API KEY LogConfig CloudWatchLogsRoleArn GetAtt RoleAppSyncCloudWatch Arn ExcludeVerboseContent FALSE FieldLogLevel ALL API SchemaThe GraphQL schema is fundamental to all GraphQL platforms This can be embedded directly in the YAML template or stored in S and referenced within the template I have left it in the template for simplicity Within the schema you are specifying the data types and the mutation and query interfaces Query is using for reading data out of the API and mutations are for manipulating the underlying data Each of the mutations and the readData query all operate on a single record The readAllPKData query will return all items for a particular pk value Depending on how you are indexing the JSON item you could for example use this query to return all child records for a particular parent key GraphQLApiSchema Type AWS AppSync GraphQLSchema Properties ApiId GetAtt GraphQLApi ApiId Definition schema query Query mutation Mutation type Data data AWSJSON pk String sk String type DataCollection items Data nextToken String input WriteDataInput pk String sk String data AWSJSON input UpdateDataInput pk String sk String data AWSJSON type Mutation writeData input WriteDataInput Data updateData input UpdateDataInput Data deleteData pk String sk String Data type Query readData pk String sk String Data readAllPKData pk String DataCollection DataSourceOnce the API is created we can attach the DynamoDB table as the data source for the resolvers This tutorial only specifies one data source but the beauty of GraphQL is that you can have multiple data sources within the same API AppSync also supports Aurora AWS Elasticsearch Service and Lambda as native data sources You can also reference other AWS services via a Lambda data source GraphQLDataSource Type AWS AppSync DataSource Properties ApiId GetAtt GraphQLApi ApiId Name Ref APIName Type AMAZON DYNAMODB ServiceRoleArn GetAtt RoleAppSyncDynamoDB Arn DynamoDBConfig TableName Ref DynamoDBTable AwsRegion Sub AWS Region ResolversResolvers contain the logic mapping each query and mutation to an underlying data source with any transformation or logic needed The name of the query or mutation is specified in the FieldName parameter You can only attach one datasource per resolver Resolvers use a scripting language called Apache Velocity Template Language VTL to encode any logic The RequestMappingTemplate parameter specifies any transformation between the request and datasource The ResponseMappingTemplate specifies any transformation between the datasource and response AppSyncResolverReadData Type AWS AppSync Resolver DependsOn GraphQLApiSchema Properties ApiId GetAtt GraphQLApi ApiId TypeName Query FieldName readData DataSourceName GetAtt GraphQLDataSource Name RequestMappingTemplate gt version operation GetItem key pk util dynamodb toDynamoDBJson ctx args pk sk util dynamodb toDynamoDBJson ctx args sk ResponseMappingTemplate util toJson context result AppSyncResolverReadAllPKData Type AWS AppSync Resolver DependsOn GraphQLApiSchema Properties ApiId GetAtt GraphQLApi ApiId TypeName Query FieldName readAllPKData DataSourceName GetAtt GraphQLDataSource Name RequestMappingTemplate gt version operation Query query expression pk pk expressionValues pk util dynamodb toDynamoDBJson ctx args pk ResponseMappingTemplate util toJson context result AppSyncResolverWriteData Type AWS AppSync Resolver DependsOn GraphQLApiSchema Properties ApiId GetAtt GraphQLApi ApiId TypeName Mutation FieldName writeData DataSourceName GetAtt GraphQLDataSource Name RequestMappingTemplate gt version operation PutItem key pk util dynamodb toDynamoDBJson ctx args input pk sk util dynamodb toDynamoDBJson ctx args input sk attributeValues util dynamodb toMapValuesJson ctx args input condition expression attribute not exists pk AND attribute not exists sk expressionNames pk pk sk sk ResponseMappingTemplate util toJson context result AppSyncResolverUpdateData Type AWS AppSync Resolver DependsOn GraphQLApiSchema Properties ApiId GetAtt GraphQLApi ApiId TypeName Mutation FieldName updateData DataSourceName GetAtt GraphQLDataSource Name RequestMappingTemplate gt version operation PutItem key pk util dynamodb toDynamoDBJson ctx args input pk sk util dynamodb toDynamoDBJson ctx args input sk attributeValues util dynamodb toMapValuesJson ctx args input ResponseMappingTemplate util toJson context result AppSyncResolverDeleteData Type AWS AppSync Resolver DependsOn GraphQLApiSchema Properties ApiId GetAtt GraphQLApi ApiId TypeName Mutation FieldName deleteData DataSourceName GetAtt GraphQLDataSource Name RequestMappingTemplate gt version operation DeleteItem key pk util dynamodb toDynamoDBJson ctx args pk sk util dynamodb toDynamoDBJson ctx args sk ResponseMappingTemplate util toJson context result APIKeyAccess to the API is controlled by an API Key AppSync also supports access via AWS Cognito and IAM The length of time the key is valid for is controlled by parameter and it is in Epoch time You basically pass in a number that maps to the Epoch time of when you want it to expire AppSyncAPIKey Type AWS AppSync ApiKey Properties ApiId GetAtt GraphQLApi ApiId Expires Ref APIKeyExpiration ParametersAPIName and APIKeyExpiration must be supplied at the time of deployment APIName is used to generate name of API and the DynamoDB source table Parameters APIName Type String APIKeyExpiration Type Number OutputTo use the API you ll need the API Key and GraphQL URL These will be output at the end of the SAM deployment Outputs APIKey Description API Key Value GetAtt AppSyncAPIKey ApiKey GraphQL Description GraphQL URL Value GetAtt GraphQLApi GraphQLUrl TestingUsing the APIKey and URL output from the SAM template you can call the API I ve formatted examples of the inputs below that should help you MutationsUse this example to write data to the API Use Query Variables in the next section to specify input data mutation WriteDataInput WriteDataInput UpdateDataInput UpdateDataInput writeData input WriteDataInput pk sk data updateData input UpdateDataInput pk sk data deleteData pk DBS sk data pk sk Query VariablesConstruct your input data using Query Variables UpdateDataInput pk DBS sk data M answer S choice S Add read replicas to the database M answer S choice S Put an Elasticache Redis cache in front of the database M answer S choice S Put an Amazon SQS queue in front of the database M answer S choice S Put an Elasticache Memcached cache in front of the database WriteDataInput pk DBS sk data M answer S choice S Add read replicas to the database M answer S choice S Put an Elasticache Redis cache in front of the database M answer S choice S Put an Amazon SQS queue in front of the database M answer S choice S Put an Elasticache Memcached cache in front of the database QueryUse these examples to read data via the API query readData pk DBS sk pk sk data readAllPKData pk DBS nextToken items data pk sk ConclusionYou can find the full template yaml in this GitHub repo I would like to credit and his repo as an excellent reference in helping me put this together Please reach out with any comments or questions you may have I m always happy to help |
2021-05-21 12:19:26 |
Apple |
AppleInsider - Frontpage News |
Congress members demand Apple exit China in letter to Tim Cook |
https://appleinsider.com/articles/21/05/21/congress-members-demand-apple-exit-china-in-letter-to-tim-cook?utm_medium=rss
|
Congress members demand Apple exit China in letter to Tim CookFour members of Congress sent a letter to Apple CEO Tim Cook urging the company reassess its business dealings with China Congress members urge Apple to exit ChinaThe spotlight is back on Apple s relationship with China after a report suggested Apple makes many compromises with the Chinese government to violate the citizen s privacy Apple relies on China not only for its retail business but for its manufacturing and supply chain as well Read more |
2021-05-21 12:38:22 |
Apple |
AppleInsider - Frontpage News |
Apple Music Lossless and Spatial Audio, 'Apple Watch Series 7' leak on the AppleInsider podcast |
https://appleinsider.com/articles/21/05/21/apple-music-lossless-and-spatial-audio-apple-watch-series-7-leak-on-the-appleinsider-podcast?utm_medium=rss
|
Apple Music Lossless and Spatial Audio x Apple Watch Series x leak on the AppleInsider podcastThis week on the AppleInsider podcast your hosts look at early reviews for the M iPad Pro and inch iMac talk Spatial Audio and Lossless coming to Apple Music and evaluate the latest Apple Watch Series leak Review embargoes for the M iPad Pro and inch iMac lifted this week Those with early access praised the inch iPad Pro Liquid Retina XDR display but recognized iPadOS is missing significant features that could take advantage of its powerful CPU Rumors of the coming inch and inch MacBook Pro point to a physical redesign core processors and support for up to GB RAM These MacBook Pro models and a redesigned MacBook Air could launch early this summer Read more |
2021-05-21 12:38:16 |
海外TECH |
Engadget |
Engadget Podcast: All about Google I/O and Apple's M1 iPad Pro/iMac |
https://www.engadget.com/engadget-podcast-google-io-2021-apple-imac-m1-ipad-pro-review-123029293.html
|
Engadget Podcast All about Google I O and Apple x s M iPad Pro iMacThis week Cherlynn and Devindra chat with Chris Velazco about the ton of Google I O new as well as iMac M and iPad Pro reviews |
2021-05-21 12:30:29 |
Cisco |
Cisco Blog |
Recapping RSAC 2021: Cisco’s Keynote, Zero Trust Deployment & Passwordless Authentication |
https://blogs.cisco.com/security/recapping-rsac-2021-ciscos-keynote-zero-trust-deployment-passwordless-authentication
|
Recapping RSAC Cisco s Keynote Zero Trust Deployment amp Passwordless AuthenticationCheck out a quick summary of RSA Conference The blog recaps Cisco s Keynote Zero Trust deployment and Cisco Duo s passwordless authentication |
2021-05-21 12:00:57 |
海外TECH |
CodeProject Latest Articles |
ESB - Even Simpler Bus |
https://www.codeproject.com/Articles/5303192/ESB-Even-Simpler-Bus
|
busand |
2021-05-21 12:49:00 |
海外TECH |
CodeProject Latest Articles |
Debugging AI Code Running in a Docker Container |
https://www.codeproject.com/Articles/5302895/Debugging-AI-Code-Running-in-a-Docker-Container
|
docker |
2021-05-21 12:43:00 |
海外ニュース |
Japan Times latest articles |
IOC suggests Olympics can be held even if Tokyo is under a state of emergency |
https://www.japantimes.co.jp/news/2021/05/21/national/ioc-reassure-olympics-covid/
|
IOC suggests Olympics can be held even if Tokyo is under a state of emergency I can say it s now clearer than ever that these games would be safe for everyone participating and importantly safe for the people of Japan |
2021-05-21 21:06:59 |
ニュース |
BBC News - Home |
Diana interview: PM concerned after inquiry into BBC deceit |
https://www.bbc.co.uk/news/uk-57200207
|
johnson |
2021-05-21 12:26:57 |
ニュース |
BBC News - Home |
Covid in Scotland: Glasgow to be only Scottish area in level three |
https://www.bbc.co.uk/news/uk-scotland-57200946
|
current |
2021-05-21 12:29:50 |
ニュース |
BBC News - Home |
Coronavirus: Spain to lift restrictions for UK and Japanese travellers |
https://www.bbc.co.uk/news/world-europe-57199791
|
covid |
2021-05-21 12:44:16 |
ニュース |
BBC News - Home |
Diana interview: Whistleblower wants apology from BBC bosses |
https://www.bbc.co.uk/news/uk-57199164
|
panorama |
2021-05-21 12:38:14 |
ニュース |
BBC News - Home |
Leonard Blavatnik named UK's richest person with £23bn fortune |
https://www.bbc.co.uk/news/business-57199171
|
blavatnik |
2021-05-21 12:52:00 |
ニュース |
BBC News - Home |
Man Utd captain Maguire unlikely to be fit for Europa League final, says Solskjaer |
https://www.bbc.co.uk/sport/football/57203604
|
Man Utd captain Maguire unlikely to be fit for Europa League final says SolskjaerManchester United boss Ole Gunnar Solskjaer says he does not expect Harry Maguire to be fit enough to play in the Europa League final |
2021-05-21 12:32:27 |
ニュース |
BBC News - Home |
Restaurants and pubs are reopening inside, but what are the rules? |
https://www.bbc.co.uk/news/business-52977388
|
covid |
2021-05-21 12:10:15 |
ニュース |
BBC News - Home |
UK holidays: When and where can I go.... and who with? |
https://www.bbc.co.uk/news/explainers-52646738
|
uk |
2021-05-21 12:18:36 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
来週(5/24~28)の日経平均株価の予想レンジは、 2万7800~2万8800円! MSCI指数の銘柄入れ替え 後の押し目買い、ワクチン大規模接種の進捗に期待! - 来週の日経平均株価の予想レンジを発表! |
https://diamond.jp/articles/-/271985
|
|
2021-05-21 21:10:00 |
LifeHuck |
ライフハッカー[日本版] |
ネコ好き注目! ネコの形のカバンフック「nyanger」 |
https://www.lifehacker.jp/2021/05/234838-machi-ya-nyanger-start.html
|
nyanger |
2021-05-21 22:00:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
Cloud Run サービスを保護する 4 つの新機能 |
https://cloud.google.com/blog/ja/products/serverless/improving-the-security-of-your-cloud-run-environment/
|
SecretManagerと統合させることで、独自の暗号鍵を使用してシークレットを暗号化することもできます。 |
2021-05-21 14:00:00 |
北海道 |
北海道新聞 |
西岡良仁は準々決勝で敗退 テニスのリヨン・オープン |
https://www.hokkaido-np.co.jp/article/546618/
|
準々決勝 |
2021-05-21 21:13:00 |
北海道 |
北海道新聞 |
甘く香るピンクのじゅうたん 滝上 |
https://www.hokkaido-np.co.jp/article/546617/
|
滝上公園 |
2021-05-21 21:11:00 |
北海道 |
北海道新聞 |
国内で新たに5253人感染 109人死亡、重症者最多 |
https://www.hokkaido-np.co.jp/article/546616/
|
新型コロナウイルス |
2021-05-21 21:02:00 |
GCP |
Cloud Blog JA |
Cloud Run サービスを保護する 4 つの新機能 |
https://cloud.google.com/blog/ja/products/serverless/improving-the-security-of-your-cloud-run-environment/
|
SecretManagerと統合させることで、独自の暗号鍵を使用してシークレットを暗号化することもできます。 |
2021-05-21 14:00:00 |
コメント
コメントを投稿