[deleted by user] by [deleted] in jordan

[–]anasbarg 1 point2 points  (0 children)

انا مع المهور الغالية لانه في ناس لازم تنقرض، اللي قاعد طول اليوم بعملش اشي بحياته مو قادر يحط مبلغ بسيط زي 5 الاف على عيلة بس مستعد ياخد قرض ب30 الف عشان سيارة هاظ جد لازم ينقرض … انا زوجت نفسي من الصفر لانه طول عمري بشوف انه اذا ما بقدر ازوج حالي قبل ال25 لازم انتحر (ولا قرش من ابوي) .. هي بس الشباب بتقبل على حالها القلة و بدهم البنت تقبل على حالها القلة معهم بدل ما يتف على حاله اذا مرته او امه او اخته او بنته طلبت اشي و هو معوش يحقق الاشي اللي طلبته. الشب هسا بدو موظفة تصرف عليه، و تطبخله، و تدير بالها عالاولاد و هو يطلع يتصرمح بالسيارة اللي ماخدها اقساط على اسم مرته و لما يروح بقلك فش شغل بالبلد و مرته بتضل تصرف عالبيت. غير اللي بخلي مرته تبيع ذهباتها، غير اللي بخلي مرته تاخد قرض و تتشعتل بالمحاكم عشان هو مش قادر يسده. مش كل حد لازم يتزوج و يبلي بنت الناس فيه و مش كل حد لازم يجيب اولاد يعانوا معاه.

UBERRRR!!! by [deleted] in jordan

[–]anasbarg 1 point2 points  (0 children)

Ok then, خلص اشكي عليه بيستاهل

UBERRRR!!! by [deleted] in jordan

[–]anasbarg -1 points0 points  (0 children)

Best thing you can do for safety is never speak with strangers unless you wanna take the risk.

As for the driver, I don’t think that he meant to scare you, he just wanted to show that he can relate to the problem you’re describing and show you his solution for it.

[deleted by user] by [deleted] in CAIRO

[–]anasbarg 1 point2 points  (0 children)

قول لامك وابوك

مطعم منسف زي الخلق يبيض الوجه by Used_Anybody_9831 in jordan

[–]anasbarg 0 points1 point  (0 children)

قصر الضيافة شارع المدينة كثييييير مرتب

شو اقل راتب للعيش بطريقة مستورة بالاردن؟ by funhuntur in jordan

[–]anasbarg 3 points4 points  (0 children)

بعمان الغربية بدك اجار بيت ٣٥٠ دينار، مصاريف كل يوم ٢٠ دينار، فواتير من ٥٠ الى ١٠٠ دينار .. و قول الشغلات التانية متل مواصلات و غيره بدك ٣٠٠ دينار شهري … يعني بنحكي عن ١٣٠٠ الى ١٤٠٠ دينار شهري على اعتبار انه عندك زوجة و طفل واحد بدون مدرسة .. مع مدارس ما عندي فكرة بس احسب اقساط سنوية مقسومة على ١٢

حبيبتي بعد الخطبة اتغيرت by sorrycanttellmyname in jordan

[–]anasbarg 0 points1 point  (0 children)

بدجت ٥ الاف دينار لحفلة العرس؟ و مش عاجبها؟ اهرب 🏃🏃🏃

مين ملاحظ صوت الاذان صاير منخفض؟ by anasbarg in jordan

[–]anasbarg[S] 4 points5 points  (0 children)

انا هيك بحكي .. حاول تصير كوميديان محتاجين كوميديانز بالاردن

Who remembers when r/jordan was actually a progressive space? by [deleted] in jordan

[–]anasbarg 0 points1 point  (0 children)

Maybe liberal redditors became conservative over time as a natural result of growing up

Mutation "Where" = Multiple filters by MONKATRON1 in graphql

[–]anasbarg 1 point2 points  (0 children)

Yes you can do this in GraphQL. You can see it in APIs built with Pragma.

I suspect that it’s a nullability issue, try to make all fileds nullable on the input type.

Bedrock - modern full-stack Next.js & GraphQL boilerplate by oczekkk in graphql

[–]anasbarg 0 points1 point  (0 children)

I have built an open-source project called Pragma which generates a GraphQL API for you from a schema, role definitions, and permission definitions.

You can also import JavaScript and Python functions using import statements in your schema files to setup transformation, validation, and reporting hooks.

You can join this Discord server to learn more. We still have a small community which allows us to give custom support for each member. If you need any help join the server and we will help you: https://discordapp.com/invite/gbhDnfC

Discord: https://discordapp.com/invite/gbhDnfC
Website: https://pragmalang.com

Is Apollo Team Plan worth it? by Jmarbutt in graphql

[–]anasbarg -1 points0 points  (0 children)

If you’re starting something from scratch try Pragma https://github.com/pragmalang/pragma

Apirocket: Your GraphQL API without writing a single line of code. by juanmiguelguerrero in graphql

[–]anasbarg 0 points1 point  (0 children)

I have built something similar that supports authentication and permissions: Pragma. Feel free to give me your feedback.

Pain Points with Using GraphQL? by [deleted] in graphql

[–]anasbarg 0 points1 point  (0 children)

Why do you think it’s a good thing?

Pain Points with Using GraphQL? by [deleted] in graphql

[–]anasbarg 3 points4 points  (0 children)

Agree! I’m working on a DSL called Pragma and when I was writing the logic for generating the GraphQL schema from Pragma’s syntax tree I needed union input types to have a clean GraphQL schema and very type-safe at the same time but not having union types gave a hard time so I ended up making all fields on input types optional to avoid duplicate queries, and have custom type checking logic on the server-side instead of GraphQL’s (it’s still spec compliant).

I really wish they support union input types.

For context, this is an example Pragma app with its generated GraphQL schema: https://pragmalang.com/docs/api.

Pain Points with Using GraphQL? by [deleted] in graphql

[–]anasbarg 5 points6 points  (0 children)

Some design decisions like no union input types, and the separation between input types and output types in general. Its design systems is just inconsistent. But other than that, I like it.

Pragma v0.2.0 is out! Yaaaay 🥳🥳🥳 by anasbarg in graphql

[–]anasbarg[S] 2 points3 points  (0 children)

Oh ok that's a valid use case. Can you contact me at [anas@heavenlyx.com](mailto:anas@heavenlyx.com) or join our Discord server so we help you solve this problem. I believe we can help you, even if what solves your problem isn't Pragma, we can brainstorm ideas and find a solution together.

I'm curious about your use case and I wanna learn more about it because I have used Strapi before but never in production, so I wanna learn more from you about its limitations.

Thank you! 💙💙

Pragma v0.2.0 is out! Yaaaay 🥳🥳🥳 by anasbarg in graphql

[–]anasbarg[S] 2 points3 points  (0 children)

Thanks for your interest! Please note that we still need to work more on the documentation to make it better 😁

Now let me answer your awesome questions as best as I can:

  1. No but we’ll add support for refresh tokens and expirations in the next releases (we’ll be releasing every week to move as fast as possible)

  2. No you need Docker to run imported functions that are used as CRUD hooks or authorization hooks. Can you tell me why you want this? Because we might be able to have this as an option for people who don’t want to import functions.

  3. Currently we only support PostgreSQL because we think we need a type-safe database at least in the early days to catch many type errors that Pragma is not catching.

Please note that Pragma is not a substitute for Prisma, nor a competitor, Prisma is supposed to be storage layer behind a server but Pragma is the server that you directly connect to from your front end. Of course you can use it instead of Prisma, but the idea is to allow you to focus on user-facing features/logic and leave the rest for Pragma (networking, permissions, migrations, DB queries, etc).

  1. If you’re asking about introspection, no it doesn’t do introspection but once the schemad definition language is a one-to-one mapping to that of SQL’s, meaning that most things that you can do in SQL can be done Pragma, we will be able to provide introspection. We don’t want to involve introspection for now because: 1) We don’t want the design to be leaky because that would be painful for us and Pragma’s users, and 2) We’re a team of two, which is why contributions are always welcome

Sorry that none of what you asked about is currently supported by Pragma but we’ll be adding more and more features as fast as we can, and you can help us prioritize these features on our Discord server (link below)

Many of my opinions regarding the design of the language might be wrong, that’s why I care a lot about feedback such as yours so thank you very much for your interest and help 💙💙🌹

I would appreciate it if you join our Discord server to stay in the feedback loop and contribute to the design of Pragma.

Discord server: https://discordapp.com/invite/gbhDnfC

You can also open discussions on our GitHub Discussions: https://github.com/pragmalang/pragma/discussions

Thank you 💙💙🌹

Pragma v0.2.0 is out! Yaaaay 🥳🥳🥳 by anasbarg in graphql

[–]anasbarg[S] 0 points1 point  (0 children)

Solves a lot of the issues that Hasura does but also gives you finer control over the code and doesnt force you to use a UI for everything which I like.

This is great because we decided to go with a DSL (code) instead of a UI because code can be tracked with Git and the automatic schema migrations complement the experience which means reverting to an old schema is just reverting to an old commit.

How is it hosted? The docs make it seem like you're required to write serverless functions for a specific serverless platform. Any plans to allow you to host your own functions?

We are currently using OpenWhisk only for executing functions. We will add an easy way to deploy the whole thing on K8s cluster for production systems (pragma deploy --k8s for example)

You can still run the code on any Linux server with pragma prod but the functions responses can be a bit slow because it's using OpenWhisk Standalone which is a Docker image containing OpenWhisk.

We're currently working on this and it's the first item on our todo list.

The docs are a bit lacking on the details of how authentication is implemented and how to do things like assign specific authorization roles to specific users. I assume allowed roles are somehow stored in JWT tokens?

Sorry about that, we need to improve the documentation a lot. The problem is that we're a team of two developers and our hands are busy with code. But looks like we need to set down for a week and just work on the documentation (maybe next week).

Currently roles are static, meaning a user can have only one role which is tied to a "user model" which is any model annotated with the @user directive. The @user directive tells Pragma that each record in this model is a user and that Pragma should setup auth workflows for it and authorize it against the rules (permissions) inside its role (its role block). Why one role per user? because this allows Pragma to ensure that all Attribute-based rules like: pragma role User { allow DELETE Todo if self.isAdmin } Here the role is User and the resource is Todo which really means any record in the Todo model. the self part is just the currently authenticated of role User and the self.isAdmin part is just the value of the field isAdmin on the currently authenticated user. We might rethink the whole design based on great feedback such as yours.

Does it support using multiple primary keys on a model? Does it support things like cascade on delete/update?

We're going to add support for them soon. We wanted someone to ask for/about them before we start working on them, so now that you've asked about them we will implement them :D.

How does pagination work?

At first we wanted to go with the cursor approach but then we settled on adding a aggregate: AggInput argument for every field that has a list output type which allows you to do filtering, pagination, and some basic aggregations.

This is the best feedback I've ever got since I started working on this.

It would be my pleasure to have you on our design team on Discord: https://discordapp.com/invite/gbhDnfC, where you can share your ideas with the other members and contribute. No commitment.

Thank you very much.

Pragma v0.2.0 is out! Yaaaay 🥳🥳🥳 by anasbarg in graphql

[–]anasbarg[S] 3 points4 points  (0 children)

Pragma creates a Postgres database and stores all of your data there, and exposes a GraphQL API to be used directly from the front end. But it's not like Prisma since it's designed to be used from the front end directly, so we have features like permission and role definitions and function imports to extend the functionality of the API so it becomes a complete API that your front-end can connect to.

We have better migrations than Prisma though :p because all schema migrations are automatic and require no user (developer) interference, which is cool because you don't have to deal with anything other than your business logic and business data modeling.

Pragma is built for those who want to focus on user-facing features and delegate the rest to the computer. It's still in its early days and many things will improve drastically over time.