Fueling Curiosity, One Insight at a Time

At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.

Feb 9, 2023
Set log level carefully, because depending on the level some logs may never be passed to the backend and will be unavailable for future debugging.
keshav.chakravarthy
keshav.chakravarthy
Feb 8, 2023
We can use git shortlog instead of git log to group commits by author using --group=author option.
vaibhav.yadav
Vaibhav Yadav
Senior System Analyst
Feb 6, 2023
we can pin specific docker image to use by tagging the commit SHA


build:
  stage: build
  image: docker@sha256:the_sha
  services:
    - docker:dind@sha256:the_sha

keshav.chakravarthy
keshav.chakravarthy
Feb 6, 2023
To get help on gitlab CI the forum link is forum.gitlab.com
keshav.chakravarthy
keshav.chakravarthy
Jan 23, 2023
Shopify has released LSP for Ruby which has been quite stable for sometime https://github.com/Shopify/ruby-lsp
iffyuva
iffyuva
Jan 20, 2023
MermaidJS can be used in Gitlab description and comments to display workflows and flowcharts
https://docs.gitlab.com/ee/user/markdown.html#diagrams-and-flowcharts
ananth
ananth
Jan 16, 2023
Aliases in Graphql.
Let’s say we have a query that return us the cars Data. If we add both the queries, we will get an error.
Fields "cars" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.
UseCase Example:
👇This will throw error


{  
  cars(filter: "name = Cars") {
    edges {
      node {
        name
        speed        
      }
    }
  }
  cars {
    edges{
      node{
        name
      }
    }
  }
}


👇This will work


{  
  slowCars: cars(filter: "Cars") {
    edges {
      node {
        name        
      }
    }
  }
  fastCars: cars {
    edges{
      node{
        name
      }
    }
  }
}


It works because we are using aliases here. Aliases let us change the names of the data that is displayed in a query’s results. It is incredibly helpful when we need to fetch the same data using different filters.

Extra Resources: https://blog.logrocket.com/using-aliases-graphql/#:~:text=What%20are%20GraphQL%20aliases%3F,it%20according%20to%20your%20specifications.
syedsibtain
Syed Sibtain
System Analyst
Jan 16, 2023
Aliases in Graphql.
Let’s say we have a query that return us the cars Data. If we add both the queries, we will get an error.
Fields "cars" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.
UseCase Example:
👇This will throw error


{  
  cars(filter: "name = Cars") {
    edges {
      node {
        name
        speed        
      }
    }
  }
  cars {
    edges{
      node{
        name
      }
    }
  }
}


syedsibtain
Syed Sibtain
System Analyst
Jan 14, 2023
test revalidate NEXT
mainak
mainak
Jan 13, 2023
We have 7 different TypeScript utility types, like Pick Omit Partial NonNullable React.ComponentProps React.MouseEventHandler and special one React.PropsWithChildren

React's utility type PropsWithChildren enables components to take both props and child elements as input.

It is used in the definition of the component to identify the types of properties it can receive, including the children prop, which contains any elements contained within the component's JSX. In addition to children, it allows for the use of various props.

UseCase Example



const Track = ({ children }:PropsWithChildren) => {
  return (
    
{children}
); };


Additional Resources: https://www.chakshunyu.com/blog/7-typescript-utility-types-for-react-developers/
syedsibtain
Syed Sibtain
System Analyst

Showing 45 to 47 of 79 results

Ready to Build Something Amazing?

Codemancers can bring your vision to life and help you achieve your goals