Just posting here the workaround that I found in GitHub to change the NestJS Validation errors. I was trying to format the errors and include the field names.
I spent a lot of time in NestJS docs, googling and reading GitHub issues until I found this one, with a perfect answer (for now, as I see that it's something not developed yet in NestJS in an easy way).
The full workaround (and the discussion) you can find here:
https://github.com/nestjs/graphql/issues/1053#issuecomment-786972617
There are other useful (and simple) solutions in this thread. ;)
Related
so I'm getting in the world of service workers, found it complex for my level, and despite I manage to cache my physical files in my vue 3 project. I'm struggling with the way of caching the response from headless CMS, there is a lot information around about in general most of then very old, at the beginning I tried using workbox, then I read that you cannot catch graph response or post response(correct if I am wrong), in addition I was having a lot of issues trying to include the script with the vue 3 project and some error about some array, so ended up building the sw from scratch and it worker pretty well so far. Now I'm facing the issue with the graph response, so far I have read it's not easy which is quite discouraging when u read it from more experienced people. I have found some examples and lot of user asking the same question here some with no response as well, and so far I found an interesting response(3 years old), however I am not sure if this actually applies for my case if is deprecate. He provides a code example, however is not providing information about what exactly does the script, you can see the response here
So I am assuming the URL that needs to be provide is the url to my graph API in this case the one provide for CMS. And the in the variable cachedResponse under the catch, do I need to provide the query variable, meaning the const that I am using to call the graph? I have to mention I am not using apollo nor axios just a normal graph inclusion.
Also when I tried to run this code, at the beginning I got an issue with the script from dexie.js and had mime issue which I tried to correct with some suggestion from here. Which did not work for me. I thought that was my sw cache playing bad, however I cleaned it got same issue.
So so far have been a long way, It seems there is not magic formula, but if I can receive an advice or different approach from what I have been trying so far, would be very welcome. Thank you in advance for the help : )
I am implementing a Wagtail powered blog within a larger (primarily DRF) driven app. I'm attempting to use drf-yasg for my documentation.
Since installing wagtail, the docs are now throwing
'Request' object has no attribute 'wagtailapi_router'
It looks to be related to the introspection that drf-yasg does, and all I can find about excluding views from drf-yasg is done at the code level. Being an installed module obviously I want to avoid that.
Has anyone got these 2 (3) components playing nicely together?
It's been a very long time since you asked this question, but as I found this while looking for an answer myself, I thought I might share what worked for me.
Note that I'm not using drf-yasg, but rather DRF's own schema generator. They do however have a lot in common.
The problem in my case was that the schema generator URL was defined like this:
path(
"schema/",
get_schema_view(title="My API Schema"),
name="openapi-schema",
),
What I needed to add was a patterns= argument that referenced my API specifically, leaving out the other non-API urls (like Wagtail):
path(
"v3/schema/",
get_schema_view(title="My API Schema", patterns=router.urls),
name="openapi-schema",
),
I hope that helps... someone :-D
I am currently evaluating possibilities, how to write/generate level2+ rest API. I came across karharis and i pretty like the concept and the whole idea how its done seems sound to me. But I have not found answers to these questions:
How to handle security properly. I can imagine that it might get tricky, as JSON api supports traversing to some extent. (out app will run in spring environment, so I suppose that we might use spring-security, but I do not know, if we will encounter some hidden traps)
API versioning. I havent found any clues how to handle API evolution. Are there any already supported options (content negotiation, path variable, query parameter...?) or do we need to hack it ourselves?
Thanks in advance!
I tried installing DX_Auth in CI 2.1.0 and it's throwing errors everywhere. I took a look at some of the files and much of it is written for PHP 4. Should I be using a different auth library instead?
Things I noticed:
Uses Classname instead of __construct. However, this is easy to change
DX has a plugins folder while CI does not. Is this the equivalent of the *third_party* folder?
Also, there is no $this->load->plugin() which to load the DX plugin folder
Took a look at DX_Auth.php and saw it says (c) 2008. So...it hasn't been updated since 2008?
This is my first time using an Auth library. Should I be using a different library instead of DX_Auth?
Personally I have stuck to using Tank Auth and it is up to date IMHO.
Details are here: http://www.konyukhov.com/soft/tank_auth/
Also changelog etc; here: https://github.com/ilkon/Tank-Auth
Try ion_auth: http://benedmunds.com/ion_auth/
It is updated frequently and works correctly with latest version of CodeIgniter.
Few years back I used DX Auth. It worked great!
3 months ago, again I had to use authentication library in one of my (Code Igniter) projects. When I searched for DX auth, found very little information. Even I couldn't access their users manual that was well written. After searching for a while, I found the code on github. Now, I've Implemented it with CodeIgniter 3 without any issue. However, I stuck in some places due to lack of documentation. But it's not a big issue.
DX auth is getting a new refraction and upgrading the library, but still it isn't outdated, you can use the library functionality's without any issues.
Simply modify the Controllers and Models by adding a postfix CI_
DX Auth is now on GitHub
could any one guide me on how can I update status on linkedin using codeigniter?
Any help appreciated thanks!
I implemented this library into CI to make sure a user could log in with his LinkedIn profile. Maybe you can also update the status of a user.
http://code.google.com/p/simple-linkedinphp/
Implementing it in CI is pretty easy if you know your way around in CI.
I really like it when people write libraries for others to use and the code is commented/well thought out/well structured and is easy to follow.
I tried the other examples, but settled on this one.
http://blog.justni.com/posting-to-linkedin-from-php-and-codeigniter/
Edit:
Having banged my head for a long time on the POS code of Sudhir and the code above. Yes I can change my opinion, because when I started to work on it, it just doesn't work!.
Although I am new to CI, I managed to do the same as P.T and implemented the lib into CI.
The simple-linkedinphp class works like a charm.
I can now authorise an app, authenticate, get profile details and even post to linkedin.
I even posted a comment on Sundir's blog that it doesn't work and he deleted the comment! Stay away, well away if you don't want any headaches!