I’m currently toying around with GraphQL on with HotChocolate on .NET Core Microservices. After implementing logging I ran into a bit of a problem every time I opened the GraphQL playground.
While observing my logs I noticed that an almost continuous stream of Schema logs were appearing which made it fairly difficult to track down any legitimate errors. The solution to this turned out to be fairly simple – playground offers both a polling enabled and polling frequency setting that can be configured locally:
I simply disabled this for testing, and then increased it to 30s once I’d migrated my logs to seq.
It has all been pretty straight forward, however I hit an error when attempting to run docker build:
RUN dotnet restore
—> Running in 734e82e92c23
/usr/share/dotnet/sdk/2.2.207/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [/src/myMicroservice.csproj]
The command ‘/bin/sh -c dotnet restore’ returned a non-zero code: 1
Updating the Dockerfile references seems to have resolved the issue. I replaced each occurrence of 2.2 with 3.0 and re-ran the following command:
I’ve finally decided to start learning typescript while working on a side project. The plan was to convert the existing project over using the following command:
npm install --save typescript @types/node @types/react @types/react-dom @types/jest
After restarting the web server I had expected to see a tsconfig.json file that would allow me to setup my preferred configuration. Unfortunately, mine was missing.
A bit of Googling revealed that the tsconfig file isn’t actually generated until you add a .ts or .tsx file to the project. In my case, I simply renamed an existing component and the configuration file was generated during the next startup. Note that you will also have to remove your jsconfig.json file (if you haven’t already).
I’m implementing Cognito User Pools for an app and currently adding social providers (Google, Facebook, etc).
The setup process seems pretty straight forward, however the social options did not appear on my hosted ui.
It turned out that I’d missed the last step in the documentation:
– Go to “App Client Settings” (left hand menu under App integration)
– Look for “Enabled Identity Providers” and check any that you want to show
I found this a little unintuitive as I’d expected it to show once it was enabled in the “Identity Providers” section. I probably just need to learn to read ALL of the docs!
I recently upgraded my .net core 2.2 project to .net core 3.0. When trying to add a migration I hit the following error:
add-migration : The term ‘add-migration’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
At line:1 char:1
+ add-migration events
+ CategoryInfo : ObjectNotFound: (add-migration:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
It turns out that there have been a few changes to how this all works. You’ll need to go to package manager console and run the following: